Quick question - I hope a simple answer.
I know that a tag <nav>is a block level element. Now I know that everything that you put inside this tag can also be placed inside <div>in terms of content and style.
Now, when I set the position of this element to fixed ( position: fixed), it works when I use <div>with a tag id, but not when I do it inside <nav>.
While I use a single tag <nav>, could I just create it using the nav { style here }correct one? I do not have to use id for this.
However, the position style does not work with <nav>.
Is there a reason for this, or should I always use ideven with <nav>??
EDIT
Sorry to forget to mention my user information. I use chrome 34 and I know the difference between classes and identifiers, but I saw stylesheets and tutorials to double check where they did what I described. That is why I am confused.
I assume the question will be: "Why do some css styles work in the div tag and not in the nav tag?" I thought it was just a semantic difference, it’s easy to say where the navigation structure is.
source
share