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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a css style which will draw a box with 100% height?

Status
Not open for further replies.

passs

Programmer
Dec 29, 2003
170
RU
Hello everybody!
Does anyone know how do create a style, which will create a box with 100% height and some background.
I tried:
#rightspace {
background-image: url(i/pics/left-bg.gif);
width: 100px;
height: 600px;
margin-left: 60px;
float: left;
caption-side:top;
}
and use it like:
<body>
<div id="rightspace"></div>
</body>

but it doesn't work. what's the problem?
I'll be very thankful for any ideas!
Thanks,
Alex
 
oops, here in style:
height: 100%;
:)
but eventhough it doesn't work
 
What is wrong with your example is that if the parent container has no set height, standards say that height 100% will revert to auto; (which means only cover as much as the text inside). See oppcos' solution in this thread to see how to overcome this problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top