Jump to content

I want Height="100%"


ScrollMaster

Recommended Posts

Here is my goal. I want to create a table, or either div tag that will have the height to the bottom of the page.But of course having height:100%; does nothing of the sort. What is the simplest method to achieve this? I want it to hit the bottom of the brower wherever it is and I am quite sure it should be possible without javascriptplease somone enlighten me. :)

Link to post
Share on other sites
Here is my goal. I want to create a table, or either div tag that will have the height to the bottom of the page.But of course having height:100%; does nothing of the sort. What is the simplest method to achieve this? I want it to hit the bottom of the brower wherever it is and I am quite sure it should be possible without javascriptplease somone enlighten me.  :)

Just be giving the table width will not show any change add a empty <td> tagIs that what u wanted???<HTML> <BODY> <table width="100%" bgcolor="#ffff66" height="100%" border="0"> <tr> <td></td> </tr> </table> </BODY></HTML>
Link to post
Share on other sites

I just tried it... this will do exactly what you're asking for...<div style="height:100%; border: 1px solid red;">test</div>I added the border so that you can visually see that it is indeed taking up the entire browser window. If it's inset a little, zero-out the margins and padding for the div and the body.

Link to post
Share on other sites
I have had the problem before myself and never found a solutions.  This was the most enlighting article I found at the time.  I hope I am not violating a rule by posting another page here but it does go into this subject in depth.http://www.quirksmode.org/css/100percheight.htmlJed

<html><style type="text/css"><!-- html, body { height:100%; }body { margin:0; padding:0; }div.mainDiv { position:relative; min-height:100%; height:100%; width:400px; background-color:#F00; }/* mozilla hax \*/html>body div.mainDiv{ height:auto;}/* mozilla hax */--></style><body> <div class="mainDiv"> content Text </div> </body></html> :)
Link to post
Share on other sites
  • 2 weeks later...

will those mozilla hax validate? I'm using:"-moz-border-radius:5px 5px 0px 0px;"on my site and that is the only thing that keeps my CSS from validating. :)

Link to post
Share on other sites

Archived

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

×
×
  • Create New...