Jump to content
  • Advertisement
Sign in to follow this  
shadowstryker

[web] DIV problem

This topic is 4832 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For my sidebar, I'm am using: float: left; height: 100%; min-height: 600px; width: 160px; to format my DIV. Though this does not actually fit 100% of the container div. I.e. the height of the siderbar is 100% of screen height, and then shifted down as it's not at the top (don't like it doing this, but I can live with it), but when the page is longer, the side bar doesn't stretch. Any suggestions/comments? Does really need to be FF and IE compatible.

Share this post


Link to post
Share on other sites
Advertisement
What are you trying now? From what you've said, it sounds like the default behavior of a div with no style or class specifications should fill the rest of the page so long as you specified that the div on the left is aligned on the lefr.

Share this post


Link to post
Share on other sites
If I understand the problem correctly, you should set the body margins to 0.

edit: Actually, that doesn't sound relevant now. You want the sidebar to stretch with the content of the page and be 100% screen height when the content is not longer than the screen, correct? I don't know of any solution other that what you described, but then again I am no expert.


jfl.

Share this post


Link to post
Share on other sites
sort of,

I'd prefer it to stretch to the bottom of the screen (technically not 100% in FF due to different way of interpretting CSS to IE), and if it goes past it, then it should stretch as well.

e.g.


<div id="container">
&lt;div id="sidebar"></div>
&lt;div id="pageContent"></div>
</div>



I've used CSS to make the two DIVs sit side by side as columns.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You can't depend on the height property behaving consistently across browsers, and the max/min-height property isn't supported by IE.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!