SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Location
    Melbourne, Australia
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Declaring "article" in CSS3

    I am trying to build a site using html 5 and css3.
    In the html I have declared <article id="travel">
    How to I show it in the CSS? I have tried #travel, article[id=travel], but neither work.

    Can anyone help me?

    Thanks,
    Vicki

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    That should work, Vicki. Make sure to add

    Code:
    article {display: block;}
    to the CSS, as browsers don't recognize HTML5 elements as block level elements at this stage.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,295
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    You'll also need the fix for IE which I guess you already are using as it won't work in IE without it (which is why I don't use html5 yet).


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
  •