By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

selected clearing

P: n/a
I have a floated column on the left and a left floated main section
next to it. I have some left floated elements in the main section and
sometimes I want to clear an element so that the subsequent elements
will not be floated, but still remain floated next to the left hand
column. . However, when I add "clear:both" to an element in the main
section, it clears not only the other elements in the main section,
but the left hand column too. Everything form that point on is below
the bottom of the left hand column. How do I clear just the items in
the main section ?

Jan 24 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 24 Jan, 16:36, grou...@reenie.org wrote:
I have a floated column on the left and a left floated main section
next to it.
1. Post a URL to an example. This makes it easier for people to help
you. Not surprisingly, the best people are also busy people.

2. Read http://brainjar.com/css/positioning/ for guidance on most
issues with CSS box model and especially float / clear.

3. This is a CSS issue, not really HTML. Posting to c.i.w.a.s would
have been more appropriate.

Jan 24 '08 #2

P: n/a
On Jan 24, 10:36 am, grou...@reenie.org wrote:
I have a floated column on the left and a left floated main section
next to it. I have some left floated elements in the main section and
sometimes I want to clear an element so that the subsequent elements
will not be floated, but still remain floated next to the left hand
column. . However, when I add "clear:both" to an element in the main
section, it clears not only the other elements in the main section,
but the left hand column too. Everything form that point on is below
the bottom of the left hand column. How do I clear just the items in
the main section ?

URL?

Daniel

http://a-ok-site.com
Jan 24 '08 #3

P: n/a
gr*****@reenie.org wrote:
I have a floated column on the left and a left floated main section
next to it. I have some left floated elements in the main section and
sometimes I want to clear an element so that the subsequent elements
will not be floated, but still remain floated next to the left hand
column. . However, when I add "clear:both" to an element in the main
section, it clears not only the other elements in the main section,
but the left hand column too. Everything form that point on is below
the bottom of the left hand column. How do I clear just the items in
the main section ?
Make the main section a new "block formatting context" with overflow:
hidden.

http://www.w3.org/TR/CSS21/visuren.h...ock-formatting
Jan 24 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.