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

Liquid vertical bar 1

Status
Not open for further replies.

k4ghg

Technical User
Dec 25, 2001
191
US
Hi - I am adding some code to an existing file and would appreciate some help. I want to add two bars that go the full length of the left side of a page. The length will change from time to time. I tried adding "height: 100% and height: auto" but it does not work. It will work when I add height: 50em, but I need some thing fluid. I also tried to move the </div> around without too much luck.

Here is part of the code.

<div> <!-- Container -->
<div style="float: left; background-color: #893AA4; width: 10%; "><!-- bar 1 --></div>

<div style="float: left; background-color: gray; width: 0.5%; "> <!-- bar 2 --></div>

<div style="float: left; background: white; background-repeat: repeat-y; width: 89%; height:100%;font-family: Gill, Helvetica, sans-serif; font-size: 1.1 em;height: 100%; ">
<h1 style="font-size: 2em; text-align: center; color:red; ">test</h1>
</div>
</div>

Thank You... Ronnie
 
If the parent element does not have an explicit height set in a stylesheet or style attribute, the child element cannot determine what it is supposed to be 100% of.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top