The Net, the Web and other Geeky stuff
Author: MikeW Date: 2016-05-22 16:24 Tweet
Here is the problem I ran into. I want to remove the indent from an unordered list HTML list using CSS. First, let’s start with a list.
So the information I got said to do this:
1ul {padding:0px; list-style-type: none;}
Which results in:
However, this is not what I want. I still want the bullets. How about we change the style to square
.
1ul {padding:0px; list-style-type: square;}
Which results in:
Well that is not what I want either. So after some searching around here is the solution:
1ul {padding:2px; list-style-position:inside; list-style-type: square; }
Which results in:
The key is list-style-position:inside;
selector is the key, it moves the bullets in line with the text. I added the padding for aesthetics.