/    Sign up×
Community /Pin to ProfileBookmark

Size Of Element Containing Floated Div

Hi

I have the following [URL=http://www.rigadon.com/toopa]page[/URL] – I suspect already you can see what I am going to ask?! I’ve floated the sidebar to the right, but this means the containing div ignores it when determining its own size. How can I align the sidebar on the right and still have the containing div encompass it?

Also – if anyone has browsers other than Firefox and IE could they have a look at this page and tell me if it appears correctly?

Thanks
Jay

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@FangAug 26.2005 — Add this: </div>
[COLOR=Green]<div style="clear:both;"></div>[/COLOR]
</div>
<div id="footer">

and minor adjustmentshtml, body {margin:10px; padding:0;}
form {margin:0;}

ok in IE6, FF and Opera
Copy linkTweet thisAlerts:
@rigadonauthorAug 26.2005 — Thanks Fang - I also found this rather nice fix which doesn't require adding any extra divs:

[URL]http://www.positioniseverything.net/easyclearing.html[/URL]
Copy linkTweet thisAlerts:
@FangAug 26.2005 — That solution relies on a hack, not to be recomended.

Look at this [URL=http://www.quirksmode.org/css/clearing.html]solution[/URL]
Copy linkTweet thisAlerts:
@rigadonauthorAug 26.2005 — Strange - that just seemed to mess things up! All the widths get messed up and things still overlap!
Copy linkTweet thisAlerts:
@FangAug 26.2005 — This works:<div id="main" style="overflow:auto;height:100%;">
×

Success!

Help @rigadon 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.3,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...