Footer issue

Hey everyone,
i got a footer which should stick to the right column, it works fine in all browser i’ve checked (chrome, IE9, IE8…) but in IE7 not
here is an example of the problem:
thanks for the help

I’m not seeing anything there that would make it ‘stick’ to your right column… In fact I can’t even figure out what you are trying to do… If it’s supposed to be in/on the right column it should be… in the right column in the markup.

In general, I think whatever it is you are trying to do, you’re over-thinking it; but it’s hard to tell since you have no actual content in the page – which IMHO is one of the biggest mistakes you can make in trying to code a layout. Code the ENTIRE markup and content (or a reasonable facsimile) BEFORE even thinking layout and then bend that markup to your will with CSS… that way you don’t get your heart set on layout concepts that aren’t viable for your content. (see “kick the PSD jockey in the nerts”)

If anything, it looks like your footer is rendering BEHIND the right column here, in every browser.

Sorry if it wasn’t clear, i acutally got a page on local with most of the site rdy until i jumped into this problem, i thought it would be easier for ppl here to read only the nesssasry part rather than all of it so i just gave this one
If you’ll look at the page i gave in chrome for example, u’ll see that all the green part begins right after the right gray column ends, even if the left column still didnt finish, which is the right thing i want to achieve
now if u’ll look at it from IE7, u’ll see that it ends when the left column’s content ends, which is wrong
thats what i want to fix, i want it to always stick to that right gray column
I made the left column have more lines than the right one on purpose so u could see where the problem is

if its still not clear then ill uplaod my current site when ill get back from uni and reply here :slight_smile:


It can’t be done in IE7 unless you lose the dimensions from the parents which are applying haslayout to the element. A parent element with haslayout will auto enclose its child floats and so the white background on #container will always start below both floats.

Your footer is actually starting under the right column in all browsers but as the footer has no background or content it doesn’t show. The issue is not the footer but the white background on your container which is clearing both floats automatically.

It could only be achieved by losing haslayout on the parents but the you lose your centred layout.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
* {
body {
#container {
	font:80% Arial, Verdana, Helvetica, sans-serif;
#main { margin:auto; }
#left, #right {
#left {
#right {
	border:1px solid #B3BBBF;
	border-width:0 1px;
	padding:0 2%
#footer {

<div id="container">
		<div id="main">
				<div id="left">
				<div id="right">
				<div id="footer">Footer</div>

You’ll need to abandon that approach if IE7 support is required. To be honest I can’t see the logic in what you are doing anyway and why you would want the backgrounds to overlap like that.:slight_smile:

You’ll need to abandon that approach if IE7 support is required. To be honest I can’t see the logic in what you are doing anyway and why you would want the backgrounds to overlap like that

I don’t want the backgrounds to overlap, but unfortunately the content on the left column sometimes bigger than the right one (like in the example) and it’ll have to come like that.

So is this problem only in IE7 ? if yes then ill just make a workaround for that.

Perhaps if you show a real example of what you want then we can offer more specific advice? I have never seen a need to do what you seem to be trying to do and I don’t think you understand what is happening to produce the layout you see. :slight_smile:

If you just want equal column colours or something like that then there are better approaches.