/    Sign up×
Community /Pin to ProfileBookmark

#wrapper DIV background not flowing behind all DIVs

I have a #wrapper div around all my other DIVs with a background colour of white… the page background is pale grey, however the white background doesn’t flow behind all divs..

See [url]http://www.equinox-group.co.uk/new/[/url] and you’ll see what I mean…

I’ve tried adding a white background to the #content DIV but there is still grey showing through between the #content-left and #content-right DIVs and above the #footer DIV

Anybody have any suggestions why this is, and how I can fix it?

Thanks!

to post a comment
CSS

9 Comments(s)

Copy linkTweet thisAlerts:
@SoreheadJul 10.2008 — your content div isnt expanding because you have the left and right content and the footer as floating elements.

add this after your footer..

<div style="clear:left;"></div>

Your content div will now expand to the bottom of your floating divs.
Copy linkTweet thisAlerts:
@LouPhiauthorJul 10.2008 — Hi, I don't think thats what I meant... the contend DIV doesn't need to expand, I want the white background which is set on the wrapper to be the background for all elements within #wrapper.

Adding <div style="clear:left;"></div> after the footer merely made the content expand further down in IE, the non-background white issue is still there in Firefox and Safari...

I appreciate the help thou' - but if you know how I can fix this I'd be very grateful!

Thanks

LP
Copy linkTweet thisAlerts:
@SoreheadJul 10.2008 — Hi,

Sorry, i wasnt looking at the source properly, put a clearing div like i showed you, at the bottom of the code just before the #wrapper closes, this will sort out your problem.

?
Copy linkTweet thisAlerts:
@LouPhiauthorJul 10.2008 — You beauty!!

Thanks so much... I will remember this for the future ?)

Cheers

LouPhi
Copy linkTweet thisAlerts:
@ray326Jul 10.2008 — I can't get to your example page but it sounds like a float clearing problem. If so then another alternative is to make the wrapper div overflow:hidden.
Copy linkTweet thisAlerts:
@LouPhiauthorJul 11.2008 — Yes I like that... that seems a little tidier somehow (no offence sorehead - your solution worked too ?)

Thanks very much

LouPhi
Copy linkTweet thisAlerts:
@SoreheadJul 11.2008 — Hi,

While overflow:hidden works as intentded, I dont use it because it throws up bugs when using min-height hacks in IE6.

Where you have content that actually exceeds the min-height, this wouldnt be visible using the overflow method as the the element wouldnt expand to show the full content.

Just giving you a heads up, incase you are using min-heights and dont know whats going wrong ?
Copy linkTweet thisAlerts:
@LouPhiauthorJul 11.2008 — Oh right - thanks! I am using min-height on a couple of DIV's so I'll test it to see if I get any problems.

Thanks again

LP
Copy linkTweet thisAlerts:
@CentauriJul 11.2008 — When setting min-height, the usual IE6 hack is to feed it the explicit height. If also using overflow:hidden to force good browsers to enclose floats, also feed IE6 overflow:visible along with the explicit height.
×

Success!

Help @LouPhi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...