SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  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
    23,596
    Mentioned
    411 Post(s)
    Tagged
    6 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.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,789
    Mentioned
    158 Post(s)
    Tagged
    3 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
  •