3 Replies Latest reply on Mar 29, 2014 11:55 AM by KevinB9

    mainnav blues

    KevinB9 Level 1

      I like to follow David Powers' example of setting up a navigation bar by first inserting an unordered list. I've actually done it twice successfully on my own pages, but the third time around is not working. Very frustrating.

      The selector #mainnav ul is working OK, but the next step - "mainnav a" is not working. The styling is not responding to the selector. Can anyone out there help me?


      I have a couple of background questions:

      1. In this situation where you have a nav element with an unordered list inside, how can "mainnav a" be effective in the first place?  In other words, how can you style a link where there is no link inside the element to begin with?


      2. With a structural element like "navigation" is there anything inherently navigational about it or is it just a div with another name?




      Kevin Burke

      Cambridge Massachusetts

        • 1. Re: mainnav blues
          KevinB9 Level 1

          It's me again. I figured out what I did wrong. I forgot to turn the list items into links! Sorry!


          My bigger mistake was trying to follow David Powers' instructions from memory. Big mistake at my age.


          That one question remains however - is there anything inherently navigational about a nav element? Or is it simply a div by another name?



          • 2. Re: mainnav blues
            David_Powers Level 7

            A <nav> element is simply a <div> with a different name.


            The same is true of <article>, <section>, <aside>, <header>, and <footer>. The difference is that the new HTML5 elements describe the role of the element in the structure of the page. They're mainly useful for search engines. Assistive technology for the blind will eventually also make use of the different elements, making it easier for disabled people to find important parts of the web page.


            Another feature of <nav>, <article>, <section>, and <aside> is that they're known as "sectioning elements". Browsers will eventually be able to use sectioning elements to generate an outline of the page's contents. Other elements, such as <div> and <header> won't be included in the outline.

            • 3. Re: mainnav blues
              KevinB9 Level 1

              David, thank you for your constancy. Much appreciated.