Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unordered is not removing the style on using class unstyled

Tags:

i am a beginner in Bootstrap .i am trying to unstyle the list using unstyled class,but it is not removing black-spot on the left most of each option how to remove this black dot please guideline my code is

<!DOCTYPE html> <html>   <head>     <title>Bootstrap 101 Template</title>     <meta name="viewport" content="width=device-width, initial-scale=1.0">   </head>  <body> <script src="http://code.jquery.com/jquery.js"></script>     <script src="bootstrap/js/bootstrap.min.js"></script> <ul class="unstyled"> <li>   <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>Option 1 </li> <li>   <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">Option 2  </li> <li><input type="radio" name="optionsRadios" id="optionsRadios3" value="option3">option3</li> <li><input type="radio" name="optionsRadios" id="optionsRadios4" value="option4">option4</li> <li><input type="radio" name="optionsRadios" id="optionsRadios5" value="option5">option5</li> </ul> </body> </html> 

enter image description here

like image 246
Ritesh Mehandiratta Avatar asked Jun 08 '13 17:06

Ritesh Mehandiratta


People also ask

How do you Unstyle a list?

For unstyled list in Bootstrap, use the list-unstyled class.

How do I remove bullets from UL using Bootstrap?

If you're using the Bootstrap framework you can simply apply the class . list-unstyled on the <ul> or <ol> element. It removes the bullets (or list markers) as well as the left padding from the list items which are immediate children of the <ul> or <ol> element.

How do I get rid of Li dot?

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


2 Answers

Bootstrap 3+

As of Bootstrap 3, you'd use the list-unstyled class to achieve this.

Unstyled - Remove the default list-style and left-margin on list items (immediate children only). This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.

Example:

<ul class="list-unstyled">   <li>...</li> </ul> 

Bootstrap 2

If still using Bootstrap 2, you'd use the unstyled class.

Unstyled - Remove the default list-style and left padding on list items (immediate children only).

Example:

<ul class="unstyled">   <li>...</li> </ul> 
like image 51
dsgriffin Avatar answered Sep 16 '22 23:09

dsgriffin


first link your bootstrap.css in your html file. you can search for "list-unstyled" class in bootstrap.css file. bootstrap current version is 3.0.0, so you can remove style from ul this way:

<ul class="list-unstyled"> <li>   <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1"     checked>Option 1 </li> </ul> 
like image 22
Zubair Alam Avatar answered Sep 19 '22 23:09

Zubair Alam