Coding in WordPress: Indent and Double Spacing under List (ordered and unordered)

macfais

New member
Joined
Nov 6, 2017
Messages
29
Points
0
Hello Guys.

I am new in wordpress coding. I have difficulty managing my words under ol and ul especially the indent alignment and spacing. Could someone help me?
 

Rob Whisonant

Moderator
Joined
May 24, 2016
Messages
2,489
Points
113
If the formatting the theme you are using does not look the way you want, you have to edit the css file and change the formatting to what you would like.

If you are not familiar with CSS, it may be better to change the theme to one you like the look of.
 

Marc van Leeuwen

Premium Member
Joined
May 29, 2016
Messages
1,132
Points
63
Hello Guys.

I am new in wordpress coding. I have difficulty managing my words under ol and ul especially the indent alignment and spacing. Could someone help me?
Can you show your codes?

I may help you out.

It is not hard to do this :)
 

macfais

New member
Joined
Nov 6, 2017
Messages
29
Points
0
Hi Rob. I really like my theme now. I do not want to change it. Could you give me at least a link for the tutorial on how to edit the CSS file?

Can you show your codes?

I may help you out.

It is not hard to do this :)
It is a text source only from Wordpress.

"<ol>
<li> text text text text until second line</li>
</ol>"

I need the second line to be aligned with the first word and not the with the number list. Also, I want to maintain the double-spacing same with my paragraphs not under my number list.
 

Marc van Leeuwen

Premium Member
Joined
May 29, 2016
Messages
1,132
Points
63
Marc van Leeuwen
Change it to something like this

Code:
<ol class="mycssclass">
<li> text text text text until second line</li>
</ol>
After that, using CSS to control what you want to display for your text in li tag.

Code:
<style type="text/css">
ol.mycssclass {
  padding: 10px;
  margin:10px;
}

/* control letter spacing in your li tag*/
ol.mycssclass  li{
letter-spacing: 3px;
}

/* control word spacing in your li tag*/
ol.mycssclass  li{
word-spacing: 30px;
}

/* or you want to increase spacing between lines, using this code */

ol.mycssclass  li{
 line-height:25px;
}
</style>
Hope it helps!
 

Marc van Leeuwen

Premium Member
Joined
May 29, 2016
Messages
1,132
Points
63
Where will I insert the CSS code? In the Additional CSS of my theme?
in style.css in your Wordpress theme folder.

If you put it directly in your PHP file then using all codes as provided.
Error is appearing on the code "<style type="text/css">".
If you putting in style.css then you need to remove 2 these lines
<style type="text/css">
</style>
 
Newer threads
Latest threads
Replies
0
Views
13
Replies
0
Views
25
Replies
1
Views
32
Replies
3
Views
90
Recommended threads
Top