Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to hide <li> bullets in navigation menu and footer links BUT show them for listing items

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 to the links and images in the nav and footer but I want to show the bullets for list normal text.

How can I do this?

like image 886
user1373581 Avatar asked May 07 '12 19:05

user1373581


People also ask

How do you hide a Li bullet?

Adding the "list-style: none" CSS class to the unordered list (<ul>) or ordered list (<ol>) tag removes any bullet or number.

How do you hide the Li marker in CSS?

For this we use the CSS list-style-type Property. It specifies the appearance of the list item marker (such as a disc, character, or custom counter style) if 'list-style-image' has the value 'none'. IF we set the none value it will not create the markers or the bullets for the lists.

How do you remove bullets from navigation in CSS?

The removal of the list bullets is not a complex task using CSS. It can be easily done by setting the CSS list-style or list-style-type property to none. The list-style-type CSS property is used to set the marker (like a disc, character, or the custom counter style) of a list item element.

Which property can be used to remove the display of bullets in a list element?

It is possible to remove bullets from ul lists by setting the CSS list-style-type property to none . As a result, the bullets disappear from the list.


1 Answers

The example bellow explains how to remove bullets using a css style class. You can use , similar to css class, by identifier (#id), by parent tag, etc. The same way you can use to define a css to remove bullets from the page footer.

I've used this site as a starting point.

<html> <head> <style type="text/css"> div.ui-menu li {     list-style:none;     background-image:none;     background-repeat:none;     background-position:0;  } ul {     list-style-type:none;     padding:0px;     margin:0px; } li {     background-image:url(sqpurple.gif);     background-repeat:no-repeat;     background-position:0px 5px;      padding-left:14px; } </style> </head>  <body>  <div class="ui-menu"> <ul> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ul> </div>  <ul> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ul> </body>  </html> 
like image 75
Flavio Cysne Avatar answered Oct 18 '22 14:10

Flavio Cysne