• ### Popular Now

• 10
• 11
• 12
• 14
• 15

#### Archived

This topic is now archived and is closed to further replies.

# HTML question (emberasing because it's so simple)

This topic is 5069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I feel awkward asking about a HTML question when i''ve been writing it for like 3 years now... but anywho, i''ve talked to multiple people about the fallowing code
<table border="1" width="100%" height="100%">
<tr>
<td colspan="2" width="100%" bgcolor="#dddddd">kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk</td>
</tr>
<tr>
<td width="211" bgcolor="#dddddd">aaaaaaaaa</td>
<td>sssasdasd</td>
</tr>
</table>

So far, we have absolutly no idea what''s wronge with the code, please do notice that if you add another <td> to the second row, the 211 pixels apply to it also, and when you apply 211pxls to the other <td> it applies to the opposite colum, please help me if you can, and excuse me for being off topic

##### Share on other sites
well what is it doing and what is it supposed to do?

right now my html file looks like this:
<table border="1" width="100%" height="100%"><tr> <td colspan="2" width="100%" bgcolor="#dddddd">kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk</td></tr><tr> <td width="211" bgcolor="#dddddd">aaaaaaaaa</td> <td>sssasdasd</td></tr></table></body></html>

it shows 3 panes: one large one on top, and 2 smaller ones at the bottom. the bottom left is bigger than the bottom right.

##### Share on other sites
I''m not clear on what the problem is. You want the cell to be exactly 211 pixels across? This really bites, i''ve run into it before.

I know this: table/TD "width"s are more of a suggestion than a hard rule. Also, tables will auto-shrink if there is not enough content to fulfill your width request. Using relative widths like 100% can screw up your code too, which is why i don''t use them much anymore. Try removing it from your table width and see what i mean. You can use CSS attributes to get more precision. But first try this and you''ll see your 211 pixel "suggestion" take effect:

<table border="1" width="100%" height="100%"><tr>    <td colspan="2" width="100%" bgcolor="#dddddd">kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk</td></tr><tr>    <td width="211" bgcolor="#dddddd">aaaaaaaaa</td>	<td>sssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasdsssasdasd</td></tr></table>

##### Share on other sites
i''m trying to have the left side 211 pixels, and have the right side x-pixles left on the screen...

Thanks for trying leviavioa, but it still seems to be against me

##### Share on other sites
Nest a table. It'll fix it right up.

ie:

<table border="1" width="100%" height="100%"><tr>     <td width="100%">Blah Blah</td></tr><tr>     <td width="100%">          <table border="0" width="100%">          <tr>               <td width="211">Left Cell</td>               <td>Whatever Is Left</td>          </tr>          </table>     </td></tr></table>

Or better yet, embrace the new standards and start using divs with CSS.

[edited by - GroZZleR on June 8, 2004 8:23:11 PM]