| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Feb 2007
Posts: 2
|
Stretching a table vertically
Hi guys. This is my first post, so be nice to me . Looks like a pretty active forum.. I know that when I specify a width of 100% for a table, it stretches horizontally to the extends of the browser . And as you resize the browser, the table resizes as well. Why am I not getting this effect when specifyign a height of 100% ?? The table does not stretch vertically ! It's driving me nuts. Any explanation? + do you know a way to make the table (in case it's small) to stretch vertically to the end of the browser??? Ayman |
|
|
|
|
|
#2 (permalink) |
|
Spare Parts
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,739
|
Try removing the doctype. This is not good practice but it will make it work. More here. http://apptools.com/examples/tableheight.php |
|
|
|
#3 (permalink) |
|
Sir digby chicken caesar
Join Date: Sep 2004
Posts: 4,404
|
i'm guessing you shouldn't need to be using tables for this anyway ... have a look at this instead: http://www.xs4all.nl/~peterned/examples/csslayout1.html unconsolidated isoparms
|
|
|
|
#4 (permalink) | |
|
SkyRocket Design
Join Date: Aug 2005
Location: Chichester
Posts: 538
|
Quote:
put some content in it. sounds like you're using the table to layout your page which is not good practice in the first place (the interweb police will book you and your name will go up in the hall of shame). tables were only originally designed to display tabular data so they will only stretch down to fill the content supplied. if the content ends before the end of the page what is the table going to do - grow some more rows and cells automagically? they do stretch sideways but not vertically (AFAIK) so i can see why it is driving you bonkers. The solution... - red pill or blue pill?? If you want to enter the matrix and fight the machines from the inside then use divs not tables for page layout |
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Feb 2007
Posts: 2
|
I did try learning it once. IT HAS AN INCREDIBLE LEARNING CURVE !! Tables are so straight forward. I did once reach a good level with divs, but then I find that the information never finishes, and people propose tricks and I dont know what. Do you guys feel that? |
|
|
|
#6 (permalink) |
|
SkyRocket Design
Join Date: Aug 2005
Location: Chichester
Posts: 538
|
yes. for the folks who've been through the betty ford tables addiction clinic it is a hard habit to get rid of. it's not easy but keep persisting and the penny will drop. it's all a matter of shifting your mindset grasshopper. don't settle for the easy option. there's websites out there which will teach you how to layout a page using divs (that stretch all the way down to the bottom of the page) - just google css 2 column layout (or 3 column layout even) |
|
|
|
#7 (permalink) | |
|
misanthrope
Join Date: Jan 2005
Posts: 12,269
|
Quote:
It can be frustrating to relearn everything, but at least you'll be employable. You don't design anything with "divs". I'm sick and tired of people not even getting the simple distinction: (X)HTML is for content. CSS is for looks. You don't "use divs" to mark up a document - you use what's appropriate to the content: p, h1, h2, dl, ol, ul, blockquote, etc - with the occasional div to create high-level divisions of the page (if need be). Then add CSS to make it look pretty. It's not that complicated: www.htmldog.com |
|
|
![]() |