Jump to content

height atribute


rmr

Recommended Posts

Hi, there.Can anyone help me with the hight atribute!I´m trying to set the hight atribute to a image ( transparent spacer.png 1x1 px ) to be set with 100% in the CSS.Also i need to do this with DIV´s where i will put my content. But the thing that happens is that the browser assumes the height in relation to the content that is inside the BOX.What i needed is to assume in relation with borders of the browser window. Like a table with 100% width and 100% height.In opera 8 browser it works fine, but in firefox 1.0.7 or I.E. 6.0 doesntIm new in CSS so i dont know if its a browser problem or if there is a way to set this.THANKS

Link to comment
Share on other sites

I Little Goat, the code i used is:<style type="text/css">div#rightcol { background: #D7D6C1 url(imgs/noise_bg.png) repeat-y; width: 171px; height: 100%; float: left; display: block; }div#leftcol { background: #ffffff; width: 760px; height: 100%; float: left; display: block; }img#spacer { width: 171px; height: 100%; }</style><body><div id="leftcol">CONTENT HERE</div><div id="rightcol"><img src="imgs/pixel.gif" alt="" id="spacer"/></div></body>

Link to comment
Share on other sites

I just tried it and it worked for me, but still the style needs to be in the head. try setting the background to a different color instead of white so you can see the actual size. :) LG

Link to comment
Share on other sites

thats the big issue, the only browser that seems to work for me is opera.In FF and I.E. it doesnt work, and thats a bit strange!So how can i make it work for most browsers?But, thanks anyway Little Goat.

Link to comment
Share on other sites

i correct the code!and the this works fine!<html><head><style type="text/css"> html { height:100%; } body { margin:0px; height:100%; } #left { float:left; width:171px; height:100%; background:red; } #right { margin-left:171px; width:589px; height:100%; background:blue; } </style></head><body> <div id="left"> </div> <div id="right"></div></body></html>--------

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...