Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't Display Numbers/Bullets for Ordererd or Unordered List

Tags:

css

All, I'm using the following code to generate some li items in an ol.

$output = '<div id="menu_options">'; $output .= '<ol class="tabs">'; foreach($menu_items as $menu){     $output .= '<li><a href="'.$menu->ID.'" class="menu_page_id">'.$menu->title.'</a></li>'; } $output .= '</ol>'; $output .= '</div>'; $output .= '<div id="menu_content">This is content</div>'; 

This works fine however I'd like to get rid of the 1., 2. etc. Is there a way to remove these and not display anything where these would typically go?

like image 251
user1048676 Avatar asked Mar 14 '12 20:03

user1048676


People also ask

How do you make a list not display bullet points?

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 list without numbers?

disp{list-style-type:none;} this code will not show any numbers.

Is bullet used for unordered list?

Typically, unordered-list items are displayed with a bullet, which can be of several forms, like a dot, a circle, or a square. The bullet style is not defined in the HTML description of the page, but in its associated CSS, using the list-style-type property.

How do you remove bullets from a list?

On the Home tab, click Bullets. To remove bullets, on the Bullets tab, select None. To remove numbers instead, click the Numbered tab and select None. Click OK.


2 Answers

Yes, use a style property of list-style-type:none on the ol, either inline as a style attribute, or in your stylesheet under the .tabs class.

See http://www.w3.org/TR/CSS21/generate.html#lists

like image 82
Mr Lister Avatar answered Sep 21 '22 05:09

Mr Lister


if you don't want to show numbers in order list then use this css code.write code for className="disp" .disp{list-style-type:none;} this code will not show any numbers

` `
  1. Apple
  2. `
  3. Mango
  4. ` `
  5. Orange
  6. ` `
` `
like image 32
Mohammed Masood Ansari Avatar answered Sep 21 '22 05:09

Mohammed Masood Ansari