Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Box element stretch 1

Status
Not open for further replies.

FreshJava

Programmer
Feb 20, 2002
65
0
0
US
Is there a way to have a box element height match screen resolution? Currently I have my height set to a static height i.e. height:600px; what I want is for the box height to match the screen height, like tables do when you set height to 100% and put a space ( )in as a place holder.

I've goolged this ? with no real results could be that I'm using incorrect search terms.

 
Box elements will only take 100% of their parent container if their parent container has explicit dimensions. Try giving the body and html explicit widths.

html,body{
height:100%;
width:100%;
}



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
That did the trick. Thanks
while I knew that box elements only expanded to 100% of the parent container I just couldn't get the body element to stretch 100% of the page. The only thing I was missing was the html added to the body element. doh!! sometimes I completely over look the easy.
 
Glad to have helped.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top