Results 1 to 3 of 3

Thread: Clear all

  1. #1
    Join Date
    Sep 2005
    Posts
    34
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Clear all

    I use
    Code:
    <div style="clear: all">
    asdsdad
    </div>
    To try to make a div position below all preceding/succeeding divs. However, I don't get that.

    What do I need to do to make a <div> take up the entire page width and not fit beside another div?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    If you want to clear floats, the proper values for the clear property are:

    • left
    • right
    • both


    So, if you only need to clear one or more left floats, use:

    Code:
    clear: left;
    one or more right floats:

    Code:
    clear: right;
    one or more each of right and left floats:

    Code:
    clear: both;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Posts
    34
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    If you want to clear floats, the proper values for the clear property are:

    • left
    • right
    • both


    So, if you only need to clear one or more left floats, use:

    Code:
    clear: left;
    one or more right floats:

    Code:
    clear: right;
    one or more each of right and left floats:

    Code:
    clear: both;
    Thanks a lot!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •