View Single Post
Old 5th November 17, 03:23 PM   #3
spikemeister
WLC Lover
 
spikemeister's Avatar
 
Join Date: Mar 2008
Location: Ireland
Posts: 54
Default Re: Adding content with innerHTML breaks css

If I understand correctly you want to align the numbers (bullets) so when the numbers change to two digit numbers the alignment doesn't change.

Example would be

Code:
li {list-style-position: outside;
    }
Try it with the list below
Code:
<ol>
  <li>item 1</li>
  <li>item 2</li>
  <li>item 3</li>
  <li>item 4</li>
  <li>item 5</li>
  <li>item 6</li>
  <li>item 7</li>
  <li>item 8</li>
  <li>item 9</li>
  <li>item 10</li>
  <li>item 11</li>
  <li>item 12</li>
</ol>
Change the css to the following and you will see the difference

Code:
li {list-style-position: inside;
    }
spikemeister is offline   Reply With Quote