Reputation: 745
I am trying to implement a user profile status bar in my webpage. For this I have done the following:
<ul style="width:250px;background-color:#F5F5F5;">
<li style="width: 20%;background-color:#abb230;"/>
</ul>
For this code I am getting the result below:
So here I want to remove the bullet to the left of the green bar, and make the green bar flush left.
I have tried doing this:
<ul style="width:250px;background-color:#F5F5F5;list-style:none;">
<li style="width: 20%;background-color:#abb230;"/>
</ul>
But this makes the entire <ul>
element disappear.
Upvotes: 0
Views: 574
Reputation: 15699
Try:
ul {
width: 250px;
background-color: #F5F5F5;
list-style-type: none;
padding: 0;
}
li {
width: 20%;
background-color: #abb230;
height: 20px;
}
Upvotes: 4
Reputation: 36
Have the following styling on the "ul".
list-style:none;
Quick pointer. Avoid so much inline styling. Separate presentation logic from the structure
Upvotes: 1
Reputation: 2486
ul
{
list-style-type: none;
list-style-position:inside;
margin:0;
padding:0;
}
This would help you
Upvotes: 1