Thread: Bullet indents
View Single Post
Old 07-31-2022, 08:20 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I would not use the increase/decrease indent buttons - they simply add/remove a <blockquote> around the text you have highlighted...the blockquote artificially increases the indent at the cost of being really ugly code, and being semantically incorrect.

Instead, you can use the padding and margin elements in your attached css style sheet.

margin-left is the amount of space between the left edge of the <ul> container and the list symbol. padding-left is the distance between the symbol and the text. You can also define margins around the <ul> independently of the list items.

Here is an example of some styling you could use...adapt as you desire.
Code:
CSS:
ul {margin:.5em; list-style-type:disc}
li {margin-left:.5em; padding-left:1em}

HTML:
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
</ul>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
The above example does not include classes - they are unnecessary if you want all your lists to be styled the same. If you want them to look differently then all you need to do is have a class in the <ul> with the styling like this:
Code:
CSS:
ul {margin:.5em; list-style-type:disc}
li {margin-left:.5em; padding-left:1em}

ul.someclass li {color:green; font-style:italic}

HTML:
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>

<ul class="someclass">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
</ul>

<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
Attached Thumbnails
Click image for larger version

Name:	list1.png
Views:	126
Size:	38.0 KB
ID:	195461   Click image for larger version

Name:	list2.png
Views:	109
Size:	42.2 KB
ID:	195462  

Last edited by Turtle91; 07-31-2022 at 08:32 AM.
Turtle91 is offline   Reply With Quote