Jump to content
xisto Community
Sign in to follow this  
Sten

Table Issues It Just Isnt Working

Recommended Posts

hey everyone!

i know i would usually be able to fix this but... its stumped me.
My table just isnt working.

Could someone help me, make some changes?

<table width="489" border="1"><tr width="498"><td width="249">test</td><td width="249">test</td></tr><tr width="498"><td width="498">test</td></tr><tr width="498"><td width="249">test</td><td width="249">test</td></tr></table>

just copy it into an HTML document and have a look.

What I want is the middle TR to go all the way along, not just what it is doing. It only aligns with the other, but I dont want that.
I cant believe i cant fix this but... looks like i cant.

anyway, any help? just change it so it works properly!

Share this post


Link to post
Share on other sites
<table width="489" border="1"><tr width="498">  <td width="249">test</td>  <td width="249">test</td></tr><tr width="498">  <td width="498" colspan="2">test</td></tr><tr width="498">  <td width="249">test</td>  <td width="249">test</td></tr></table>

Share this post


Link to post
Share on other sites

Also, you only need to specify the width of the first cell in each column. That will save a lot of typing, space and bandwidth. The table is already 489 pixels wide, so the browser assumes the rows are also, no need to specify that. By doing that, you can have unpredictable results (also, you made a typo). So therefore, you can try this:

<table width="489" border="1"><tr><td width="249">test</td><td width="249">test</td></tr><tr><td colspan="2">test</td></tr><tr><td>test</td><td>test</td></tr></table>

Notice that even the middle cell didn't need the width specified because it spans across cells which already have the width specified, it uses those measurements. Adding extra lines breaks can confuse you, so avoid them if possible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.