Monday, April 25, 2011

ccs clear:both, don't understand

Hi I seem to be having issues getting my layout to clear properly. Look at link text

I can't stop the item in the left column from pushing down the items in the right. Can anyone help?

Here another link to a screenshot with some pointy arrows

From stackoverflow
  • It's working for me

    What browser are you using?

    Could be an IE 6 double margin bug on floated elements

    morktron : I'm using Firefox 3 for Mac, I see it is even worse for IE7 on PC! :(, will post a image...
  • works good with me too and I tried firefox and google chrome

    morktron : please check the image I just added then you'll see what I mean...
  • The problem markup/style appears to be:

    <div class="clear" />
    

    This is clearing the float in your left hand div which creates the gap between your post and teaser sections.

    myblog.css (line 166)
    
    #myBlog-wrap div.clear {
    clear:right; <--- problem clear
    height:1px;
    line-height:1px;
    margin:0;
    padding:0;
    }
    

    Here's how firefox 3 renders the page with the clear disabled.

    Unrelated to your question, but you also seem to have some IE specific css issues to resolve as well. Definitely consider making a conditional ie.css for your site :)

    morktron : thanks I'll test it out now and get back to you...
    morktron : I removed it but it made no difference so I put it back. Maybe it is the
    code. I shall investigate...
    morktron : oh sorry! that's what you already said! working on it now...
    morktron : thanks, you are a legend that has fixed it :) - a thousand thank you's!
    morktron : yes, just noticed the IE errors anomalies, i shall try and fix them

0 comments:

Post a Comment