View Single Post
Old 5th November 17, 03:23 PM   #3
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

li {list-style-position: outside;
Try it with the list below
  <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>
Change the css to the following and you will see the difference

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