SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Modernizr still not able to style some HTML5 tags

    This page...
    Bug 5

    looks correct in IE9. But not in IE8.

    The brown-outlined box should be centered across the browser because I have this CSS rule...

    article {
    width: 300px;
    margin: 30px auto;
    text-align:center;
    border: 1px solid #963;
    }

    I've added modernizr which is supposed to make IE8 be able to style HTML5 tags like "article". But not working.

    Do a view source and see what I'm doing wrong. Is modernizr not as great as I thought? Or am I implementing something wrong?

  2. #2
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also tried HTML5shim, but that also fails in IE8. See...
    Bug 5 Shim

  3. #3
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need display: block;
    The script allows you to style the new elements, but they don't automatically become block level.

    Probably best to block all the HTML5 elements that you plan to use
    Code css:
    header, footer, article, nav {display: block;}

  4. #4
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, that's it. It is fixed now. thanks.


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
  •