notclive Posted April 28, 2006 Share Posted April 28, 2006 I have a navbar on the left side of my site, and i want it to be as long as the whole site. In my css page i have this code p.navbar {text-align:'center';position: 'absolute'; top: '0px'; left: '0px'; width: '175px'; height: '100%'; background:'#adc3f5'} but this only makes my navbar the height of the screen, i thought 100% would make the bar as tall as the site, how can i get the navbar's height to adjsut to the height of any page?p.s. should this be in the css area sorry if it should. Link to comment Share on other sites More sharing options...
johneva Posted April 28, 2006 Share Posted April 28, 2006 If you put a container div around your nav div and content div, then the container is the same height as the content div and the left nav div will then be 100% of the container div. Link to comment Share on other sites More sharing options...
notclive Posted April 28, 2006 Author Share Posted April 28, 2006 thanks ill try it out and tell you how it goes, do i have to put any css for the container? Link to comment Share on other sites More sharing options...
notclive Posted May 2, 2006 Author Share Posted May 2, 2006 didnt work, any more ideas or is there anything i could have got wrong? Link to comment Share on other sites More sharing options...
Little Goat Posted May 2, 2006 Share Posted May 2, 2006 ok here is what I use. no matter which column is longer, the other will lengthen to the same size: #container{height:100; overflow:visible;}#col1{height:100%; overflow:visible;}#col2{height:100%; overflow:visible;} of course, you must set the div's ids to those, or change them in the CSS. this still uses a container div (as you can probably see).LG Link to comment Share on other sites More sharing options...
notclive Posted May 2, 2006 Author Share Posted May 2, 2006 whats the # for? Link to comment Share on other sites More sharing options...
Little Goat Posted May 2, 2006 Share Posted May 2, 2006 that makes it so that whatever element has an id that matches the following text, the styles in that section will apply to them.you can change it to a . (apostraphy) if you want to use a class instead.LG Link to comment Share on other sites More sharing options...
notclive Posted May 2, 2006 Author Share Posted May 2, 2006 cant get it to work maybe you could explain in more detail, im a newb at these things. Sorry Link to comment Share on other sites More sharing options...
justsomeguy Posted May 2, 2006 Share Posted May 2, 2006 change it to a . (apostraphy) if you want to use a class instead.That's a period, btw. Apostrophe is 'For the divs, if you want to use the IDs, you do it like this:#container { ...}#col1 { ...}etc<div id="container"> <div id="col1"></div> <div id="col2"></div></div> If you want to use classes instead: .container { ...}.col1 { ...}etc<div class="container"> <div class="col1"></div> <div class="col2"></div></div> Link to comment Share on other sites More sharing options...
johneva Posted May 3, 2006 Share Posted May 3, 2006 cant get it to work maybe you could explain in more detail, im a newb at these things. Sorry <{POST_SNAPBACK}> Let us see what you got so far so we can see where your going wrong. Link to comment Share on other sites More sharing options...
Little Goat Posted May 3, 2006 Share Posted May 3, 2006 sorry, I don't know why I forgot that...anyway, I just came up with that method, have only tested in IE.LG 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