Grow your CSS skills. Land your dream job.

[Solved] IE6 and Clear

  • # August 8, 2009 at 3:59 pm

    Hi, When i use the floats and do .clear both thing after the divs ie6 doesnt seem to like it and it messes it up. How can i fix this?

    Many Thanks
    Al

    # August 8, 2009 at 4:04 pm

    Can you provide an example page along with some code?

    # August 8, 2009 at 4:55 pm

    if you can view this page in ie6 you will see what i am on about. – http://www.screen-tuts.com
    as for code, it is literaly

    Code:
    # August 8, 2009 at 5:25 pm

    After looking at this in IE, my impression is that it has nothing to do with clear:both. Simply, there is an error/browser quirk in IE6 that causes your main column to expand in width, which forces the side column down below. (You’ll notice that the two columns work fine on other pages in IE6.)

    I’m guessing it’s something to do with the way you have your article previews on your home page coded — perhaps dealing with the fact that you set a width and also padding/margin on your #post-info div. I’ve found that making sure that you don’t set a width and padding/margin on the same element tends to help with browser compatibility issues.

    If I find something specific that will help, I’ll let you know.

    – Not related, but you realize that you can only use an id once on a page? For example, on your home page, you repeat the #post-info id several times.

    # August 9, 2009 at 6:29 am

    THanks for the reply ill look into what you said about the width and padding thing.

    Also – no i didnt know that you were not alowed to… WHy not?

    Thanks
    Chris

    # August 9, 2009 at 12:33 pm
    "AlCapone" wrote:
    THanks for the reply ill look into what you said about the width and padding thing.

    Also – no i didnt know that you were not alowed to… WHy not?

    Thanks
    Chris

    Because the padding will be added to the width.

    # August 9, 2009 at 9:17 pm

    In regards to your question about ids… Ids are intended to be unique elements, and can only be used once per HTML page — that’s just the way they work. Classes can be used on multiple elements on the same page.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".