I'm trying to indent ragged li lines whilst using a custom bullet point, however any minus 'text-indent' solutions I've found online haven't worked - unless I'm missing something.
Would it be possible for someone to take a look at the code below and tell me what I need to add to indent ragged li lines?
.list-icon-pros {
list-style: none;
padding-left: 0;
}
.list-icon-pros li:before {
font-family: FontAwesome;
color: #B3B300;
padding-right: 10px;
content: "\f00c";
}
Like an ordered list element, an unordered list element (<ul>) will indent its list items — or bullet points — by default. If you'd like to change the indentation distance, then you can use the margin-left or padding-left property.
Right-click the bullet and select Adjust List Indents in the pop-up menu. In the Adjust List Indents window, change the Bullet position to adjust the bullet indent size or change the Text indent to adjust the text indent size after a bullet.
Go into Word> Preferences> AutoCorrect - AutoFormat as you type to make sure the boxes are checked for Automatic bulleted lists & for Set left- and first-indent with tabs and backspaces.
You could add a negative margin to the pseudo-element or you could use position: absolute
.
Position absolute: http://jsfiddle.net/ZwYyL/6/
.list-icon-pros {
list-style: none;
padding-left: 20px;
position: relative;
}
.list-icon-pros li:before {
font-family: FontAwesome;
color: #B3B300;
content:"\f00c";
position: absolute;
left: 0;
}
Negative margin: http://jsfiddle.net/ZwYyL/5/
.list-icon-pros {
list-style: none;
padding-left: 22px;
}
.list-icon-pros li:before {
font-family: FontAwesome;
color: #B3B300;
content:"\f00c";
margin:0 5px 0 -22px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With