how to hide
  • bullets in navigation menu and footer links BUT show them for listing items
  • 前端 未结 7 1869
    后悔当初
    后悔当初 2020-12-09 07:23

    I have a navigation menu, footer, and a slideshow which use listed style to list links and images. I have the css list-style:none; set to hide the bullets next

    7条回答
    •  野趣味
      野趣味 (楼主)
      2020-12-09 08:25

      Let's say you're using this HTML5 layout:

      
          
              
        ...
        ...

      You could say in your CSS:

      header ul, footer ul, nav ul { list-style-type: none; }
      

      If you're using HTML 4, assign IDs to your DIVs (instead of using the new fancy-pants elements) and change this to:

      #header ul, #footer ul, #nav ul { list-style-type: none; }
      

      If you're using a CSS reset stylesheet (like Eric Meyer's), you would actually have to give the list style back, since the reset removes the list style from all lists.

      #content ul { list-style-type: disc; margin-left: 1.5em; }
      

    提交回复
    热议问题