treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Clear:Both Space problem

  • So, this has happened to me before on other designs I've done, but I'm not sure what causes it or a good way to fix it.

    Basically, if I'm using an inline
    clear:both
    like in a <br /> the first line break will jump way down, leaving a huge gap. Any subsequent <br style="clear:both;"> are fine with normal spacing. It's only the first clear that does it.

    Here's a screenshot
    And here is a live working example (nevermind the broken images and such - it's just a staging install)

    Any help or clues are greatly appreciated! Thanks!

    Joel
  • Maybe try using <div class="clear"></div> instead.

    .clear {
    clear: both;
    }

    I know it's an empty div, but really, who cares.
  • Hi @joelgoodman,

    It will not work on that manner using <br /> nor <hr /> tags placing your clear attributes. I've already experience that and it didn't work.

    Instead use an inline;

    <div style="clear:both"></div> or <span style="clear:both"></span>

    or in css just like @TheDoc mentioned above.