I’m creating a 2-column page, and I’m trying to get rid of the “double-scrollers” on my larger pages, but at the same time keep the heights even. I’ve looked around on the net, but nothing seems to work right for me. Here’s what I have so far, (at least the stuff that is pertinent to this):
I know thats what turns them on, but thats not the problem. The problem is that the site has 2 columns. One is a navbar that is the same on every page and the other is the content, which is bigger on some pages than others, I gave it the added height in an attempt to even them out.
It seems no matter what I do, the columns either are uneven or they’re even but with the scrollers
You are going about this all the wrong way I’m afraid. First read the faq on 100% height (see faq link in my sig) as you can’t use it like that and then read my article about equal columns to understand the problems.
It’s not that difficult but you need to have a good understanding of CSS concepts first before it starts to make sense.
Suffice to say that it’s best if you can avoid equal columns unless you are supporting only modern browsers (ie8+) and then you can use the display:table properties.
Don’t try and copy table layouts (equal columns) or other table specific behaviours but create css friendly designs instead.
There are some things css does well and some things it needs to be pushed into doing so the path of least resistance is usually the best.
With building any site you cant design on the basis that a nav column and a content column will always be the same size.
By “double scrollers” I assume you mean the browser default plus one that you think shouldn’t be there.
I am also assuming your container doesn’t seem to be ‘containing’ your content
Here’s where I have your problem completely wrong but this info may be helpful…
If you have a container that has floated elements inside it, the container sort of disregards it’s contents height and snaps back to a smaller size, with it’s content seemingly hanging outside of it.
You can fix this by not setting a height to the main container and applying ‘overflow:hidden;’ and as long as the container doesn’t have a set height nothing ill ever be hidden, viola.
you can also shorten your margin rules like this:
margin-left: 1%;
margin-right: 1%;
margin-top: 1%;
margin-bottom: 1%;
would be;
margin:1%;
or
margin:1% 1% 1% 1%;
the order this goes in is top right bottom left
margin:T R B L;
of course it would help if you could send us to an example of your markup/look you’re trying to achieve. Anyway I hope this was helpful.
Basically both nav and content are contained in one div with a back ground image in place where the nav is.
This way, as the content expands it pushes the area of the container down also expanding the bg image (this should be repeated on the y-axis)
making it seem the nav bar is as long as the content area