Easy HTML Question

Insomnium

Senior member
Aug 8, 2000
644
0
0
I'm designing a website and it has been a long while since I did any sort of layout design using tables (must use tables instead of CSS because I have to support old browsers), and have run into a slight bump. I have a design that looks like this:

[cell][cell]
[cell][cell]
[cell][cell]

and the whole table is aligned at the top left of the page (browser window). The table is wide enough to fit on a screen with a resolution of 800 x 600 without the need for any horizontal scroll bars. Now, ideally, I would like the cells in bold to stretch out as far to the right as possible to take up the remaining space on screens running higher resolutions (but always be at a minimum of 656 pixels). Any ideas/hints would be greatly appreciated :beer: :)
 

WannaFly

Platinum Member
Jan 14, 2003
2,811
1
0
amd: think outside the box :)

I'm feeling too lazy to upload but copy and paste the attached code - it simulates what you are asking to do. Keep in mind that using pixels for width is never a good idea and I believe it isnt in the W3C standard, but it works with IE.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
it may not be entirely the right way to do it, but you can try setting the second column of cells to a width of 100%. did you also want the 2nd cell on the last row to not stretch? if so, then i would actually put a colspan of 2 on the two cells in bold and entirely skip the third cell on the last row.
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: WannaFly
amd: think outside the box :)

I'm feeling too lazy to upload but copy and paste the attached code - it simulates what you are asking to do. Keep in mind that using pixels for width is never a good idea and I believe it isnt in the W3C standard, but it works with IE.

I know there is a way to do it. I thought about in my head. I was just helping someone else at the time and didn't have time to code it so I said it was impossible. Lazy? Yes.
 

WannaFly

Platinum Member
Jan 14, 2003
2,811
1
0
Originally posted by: amdfanboy
Originally posted by: WannaFly
amd: think outside the box :)

I'm feeling too lazy to upload but copy and paste the attached code - it simulates what you are asking to do. Keep in mind that using pixels for width is never a good idea and I believe it isnt in the W3C standard, but it works with IE.

I know there is a way to do it. I thought about in my head. I was just helping someone else at the time and didn't have time to code it so I said it was impossible. Lazy? Yes.

Understandable :D
 

Insomnium

Senior member
Aug 8, 2000
644
0
0
Originally posted by: oog
it may not be entirely the right way to do it, but you can try setting the second column of cells to a width of 100%. did you also want the 2nd cell on the last row to not stretch? if so, then i would actually put a colspan of 2 on the two cells in bold and entirely skip the third cell on the last row.


The 2nd cell in the last row can stretch, but that's going to be the so-called "content" cell where text/pictures go. The top 4 cells are actually a header, and the bottom left is a navbar (there is another table in that cell). I guess I should've made that clear earlier. I might just pop a table in the "content" cell, give it a certain width, and align it to the left. The whole point of all this is to actually make the page fit width-wise in a browser on a 800 x 600 resolution.

Hmmm, I knew IE had issues with specifying pixels in CSS code, didn't know it was taboo to use pixel widths with tables though. I guess I should look into that, but how else would I keep the tables in my page the exact same width across all browsers and resolutions (except for the two cells in question) ?


Thanks for all the help guys.