/    Sign up×
Community /Pin to ProfileBookmark

overflow isn’t expanding my parent DIV to the height of it’s children

Good morning!

I have two floating DIVs within a parent div. The parent DIV is set to {overflow:visible}, and the idea is that the parent will expand to its floating children DIVs (which are of dynamic height), thus providing a steady background instead of having the children flow over the bottom border.

If only we lived in a perfect world.

See what I mean here:

[URL=”http://www.sarasotapropertygroup.com/shortsale/followup.php”]http://www.sarasotapropertygroup.com/shortsale/followup.php[/URL]

Here’s the stylesheet:
[URL=”http://www.sarasotapropertygroup.com/shortsale/style.css”]http://www.sarasotapropertygroup.com/shortsale/style.css[/URL]

I’m at a loss!

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@CFHuttonFeb 09.2010 — Link

Scroll down to subheading: "Fixing the collapsed parent".
Copy linkTweet thisAlerts:
@aj_nscFeb 09.2010 — overflow needs to be set to either hidden or auto

edit: as CFhutton pointed out....
Copy linkTweet thisAlerts:
@thebigkrummauthorFeb 09.2010 — @ AJ:

I'd tried setting it to auto; it didn't work and then I had a scrollbar ? Hidden is no good because it will clip the DIV as it expands.

@ CF:

Thanks, I did use the div:after technique and it worked; it feels more like a bandaid than a solution, but it did the trick. I don't know how I broke it in the first place, but it seems to be much better now ?
×

Success!

Help @thebigkrumm 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.17,
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,
)...