View Single Post
Old 09-03-2019, 08:05 AM   #4
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
You can use an unordered list with a different class depending on how many digits are in the number. The borders in the CSS are just to show the box-model spacing.

The mdash is not an option as a list-item marker, so I just did a quick .png file so I could use the list-style-image property. You will want to make a different image so that it aligns vertically a little better.

CSS:
Code:
p     {margin:0;
       border:1px solid green}
p.spc {margin-top:2em}

ul    {margin:-1.2em 0 0; 
       list-style-image:url('../Images/bar.png'); 
       border:1px solid red}

ul.one   {margin-left:.6em}
ul.two   {margin-left:1.15em}
ul.three {margin-left:1.7em}
ul.four  {margin-left:2.2em}
HTML:
Spoiler:
Code:
<p class="spc">1 Yellow Desert.</p>
<p>2 White Mountain.</p>
<p>3 Green Valley.</p>
<p>4
<ul class="one">
<li>How do you do?</li>
<li>How do you do?</li>
<li>Please have a coffee with us! We are so happy to see you after all this time! Do sit down, will you! Mary, would you dear bring us some cookies?</li>
</ul></p>
<p>5 Red Sea.</p>
<p>6 Yellow Desert.</p>
<p class="spc">59 Yellow Desert.</p>
<p>60 White Mountain.</p>
<p>61 Green Valley.</p>
<p>62
<ul class="two">
<li>How do you do?</li>
<li>How do you do?</li>
<li>Please have a coffee with us! We are so happy to see you after all this time! Do sit down, will you! Mary, would you dear bring us some cookies?</li>
</ul></p>
<p>63 Red Sea.</p>
<p>64 Yellow Desert.</p>
<p class="spc">159 Yellow Desert.</p>
<p>160 White Mountain.</p>
<p>161 Green Valley.</p>
<p>162
<ul class="three">
<li>How do you do?</li>
<li>How do you do?</li>
<li>Please have a coffee with us! We are so happy to see you after all this time! Do sit down, will you! Mary, would you dear bring us some cookies?</li>
</ul></p>
<p>163 Red Sea.</p>
<p>164 Yellow Desert.</p>
<p class="spc">1159 Yellow Desert.</p>
<p>1160 White Mountain.</p>
<p>1161 Green Valley.</p>
<p>1162
<ul class="four">
<li>How do you do?</li>
<li>How do you do?</li>
<li>Please have a coffee with us! We are so happy to see you after all this time! Do sit down, will you! Mary, would you dear bring us some cookies?</li>
</ul></p>
<p>1163 Red Sea.</p>
<p>1164 Yellow Desert.</p>


Unfortunately, you still won't be able to completely predict how each device will split pages. They may still split the <ul> off to the next page.
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	364
Size:	71.6 KB
ID:	173204   Click image for larger version

Name:	3.jpg
Views:	360
Size:	75.7 KB
ID:	173205  

Last edited by Turtle91; 09-03-2019 at 08:10 AM.
Turtle91 is offline   Reply With Quote