Hmm. I think I am doing it correctly; I have just <nav></nav> on the one that 
is my HTML5 version (sorry, I was calling this css3 when of course I am talking 
about the use of CSS to style HTML5 elements). And I use this CSS to refer to 
it:
nav {styles here}
(no # in front of nav in the style sheet)

On my non-HTML5 version, I use <div id="nav"></div>, and I use this in the 
style sheet:
#nav {styles here}
(using # here to refer to a div with an ID)

Maybe the confusion is that I have the css for BOTH of these 2 HTML pages on 1 
stylesheet? That should not be a problem, right?

Rory


On Oct 18, 2010, at 12:58 PM, Andree Hollander wrote:

> 
> On 2010-10-18, at 17:37, Rory Bernstein wrote:
> 
>> I have this web page:
>> http://weinraub.ehclients.com/home/
>> 
>> I am trying to use some CSS3 elements here. I have a div with id="nav", and 
>> everything is working fine. (for the nav list at top on the white background)
>> 
>> But, when I change that div instead to a <nav> CSS3 thing, the white BG 
>> doesn't work.
>> 
>> Here's that page:
>> http://weinraub.ehclients.com/home/index_css3
>> 
>> They are both using the same style sheet:
>> http://weinraub.ehclients.com/styles.css
> 
> That's your mistake. In a style sheet #nav refers to an element with 
> id="nav". If you want to refer to an _element_ nav you should not use #. The 
> same as if you want to refer to h1 elements. Likewise there is a difference 
> between footer and #footer.
> 
>> 
>> I had this happen on a previous project, where I used <footer></footer> and 
>> my style rules didn't work that way, but when I used <div id="footer"></div> 
>> it worked fine. What am I missing here?
> 
> Andree Hollander
> 
> 

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to