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
| SitePoint Sponsor |
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


That should work, Vicki. Make sure to add
to the CSS, as browsers don't recognize HTML5 elements as block level elements at this stage.Code:article {display: block;}


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).
www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge
Bookmarks