rmr Posted April 5, 2006 Share Posted April 5, 2006 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 More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 it would help if you posted your code.LG Link to comment Share on other sites More sharing options...
rmr Posted April 5, 2006 Author Share Posted April 5, 2006 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 More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 this probably wont affect it, but take the div before the # signs off. Link to comment Share on other sites More sharing options...
rmr Posted April 5, 2006 Author Share Posted April 5, 2006 it stays the same!Probably i have to use TABLES instead of DIV´s Link to comment Share on other sites More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 put your style tags inside the head. Link to comment Share on other sites More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 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 More sharing options...
rmr Posted April 5, 2006 Author Share Posted April 5, 2006 I put the tags inside head and it doesnt assume the the all area. Link to comment Share on other sites More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 well it's not filling up exactly all the space, but it's really close. is it to small or too large? Link to comment Share on other sites More sharing options...
rmr Posted April 5, 2006 Author Share Posted April 5, 2006 I change it for yellow.well it only fills the space "CONTENT HERE" and the spacer just looks like a square with the value of the widht (171px) Link to comment Share on other sites More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 it works fine for me. what browser are you using? Link to comment Share on other sites More sharing options...
rmr Posted April 6, 2006 Author Share Posted April 6, 2006 im using FF 1.0.7 Link to comment Share on other sites More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 well, I don't have firefox, but it works fine in IE. Link to comment Share on other sites More sharing options...
rmr Posted April 6, 2006 Author Share Posted April 6, 2006 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 More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 yes it does, thats what I just said! it works fine in my IE6.LG Link to comment Share on other sites More sharing options...
rmr Posted April 6, 2006 Author Share Posted April 6, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now