467,879 Members | 1,100 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,879 developers. It's quick & easy.

selected clearing

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
  • viewed: 1446
Share:
3 Replies
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
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
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.

Similar topics

18 posts views Thread by Niels | last post: by
reply views Thread by Gary | last post: by
4 posts views Thread by Roubles | last post: by
1 post views Thread by raghavendra | last post: by
1 post views Thread by TJS | last post: by
65 posts views Thread by Leslie Kis-Adam | last post: by
reply views Thread by Ikke | last post: by
3 posts views Thread by =?Utf-8?B?TWFyayBCb2V0dGNoZXI=?= | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.