Fixed size of cell

T

tshad

How do I control the fixed size of a cell?

In the following example, I can control the sizes of the 2 outside cells if
I don't set the middle cell to 100%.

If I set the middle cell to 100%, it takes all the slack out of the left and
right cells. This is fine for the right cell, as that is what I want. This
cell will hold 1 or 2 buttons, so I set the size that will contain the 2
buttons and when only one button is there the middle cell will push the size
of the right cell to exactly the right size.

I don't want that to happen on the left cell, however. I am trying to make
this cell larger that the data it contains. Padding doesn't work, as I am
using a font is not a fixed fonts, so the the right boundaries will not line
up.

I don't have a URL as I don't have a website for it, yet.

*************************************************************************************
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Add New Company</title>
<body>
<table border="1" width="100%" CellPadding="0" CellSpacing="0"
style="margin:0">
<tr>
<td style='font-family:Verdana, Arial, Helvetica, sans-serif;width:60' >
<span id="DataList1__ctl0_QuestionType">MS</span>
</td>
<td width="100%">
How many years have you been working in C#
</td>
<td width="100">
<input type="submit" name="DataList1:_ctl0:_ctl0" value="Edit" />
</td>
</tr>
</table>
</body>
</html>
*************************************************************************************

Thanks,

Tom.
 
J

Jukka K. Korpela

tshad said:
How do I control the fixed size of a cell?

Stop trying to do so, at least until you understand the issue.
I don't have a URL as I don't have a website for it, yet.

Then get one. It's disproportionate to expect that _everyone_ who wants
to help you for free also takes the trouble of setting up a test page
when you could have done it beforehand.
<td style='font-family:Verdana, Arial, Helvetica,
sans-serif;width:60' >

And don't hesitate to use the available online checking tools to check
for the syntax of your CSS. Errors like the above are particularly
nasty since the construct may appear to "work" the intended way on
faulty browsers. (Correctly behaving browsers ignore width:60.)
<td width="100%">

If you set the width of one column to 100% of the available width, how
much do you leave for the other columns?
 
T

tshad

Jukka K. Korpela said:
Stop trying to do so, at least until you understand the issue.


Then get one. It's disproportionate to expect that _everyone_ who wants
to help you for free also takes the trouble of setting up a test page
when you could have done it beforehand.


And don't hesitate to use the available online checking tools to check
for the syntax of your CSS. Errors like the above are particularly
nasty since the construct may appear to "work" the intended way on
faulty browsers. (Correctly behaving browsers ignore width:60.)

Why?

As far as I can see width is a valid attribute.
If you set the width of one column to 100% of the available width, how
much do you leave for the other columns?

I thought that 100% meant 100% of the available, after the fixed was set up.
Obviously wrong here.

Thanks,

Tom
 
S

Steve Pugh

tshad said:
Why?

As far as I can see width is a valid attribute.

Width is a valid attribute. And 60 is a valid value for the width
attribute.

But you're not using the width attribute. You're using the style
attribute. And the CSS property width takes a length as value. And 60
is not a permitted length in CSS.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top