Results 1 to 2 of 2

Thread: Things are stacking instead of ...

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default Things are stacking instead of ...

    As you can see on this page the header is to the right of the last picture of me, I want it under all of the pics. However, whatever I seem to do it keeps "stacking" on the right of the other image, what do I do?

    http://modernrevolutions.vivid-avenue.net/photos-of-me/

    Having this problem too?? Use this code after the last thing you want (ontop) for example I would put this after the last picture of me or before the header "Pictures of my Friends".

    Code:
    <BR CLEAR="all">
    Last edited by ModernRevolutions; 12-29-2009 at 10:50 AM.
    ------------------
    Check out my site here and let me know what you think

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    That issue is know as a "collapse". This happens when there are floated elements inside a container. The solution is to clear the float. Your code works, but is unsemantic. The most common solution is to give the collapsed container the following css rule:
    Code:
    overflow: hidden;
    Have a look at this article and the screencast:
    http://css-tricks.com/all-about-floats/
    http://css-tricks.com/video-screencasts/42-all-about-floats-screencast/

    You can also google "clearing floats" and you'll find heaps of info on that.

    Happy coding!

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
  •