html - 2nd line in li start under the bullet after CSS-reset -
i'm having problems ul
-list after using applying css-reset.
when text in li
long , breaks second line, text begins under bullet. i'd start same margin/padding text on right side of bullet.
sort of hard explain, if @ example-image. left-image list today. "motta varsel [...]" begins under bullet, i'd the picture on right.
how can css? assume there simple i've overlooked, can't figure out what. google searches did not return useful either.
the li
tag has property called list-style-position
. makes bullets inside or outside list. on default, it’s set inside
. makes text wrap around it. if set outside
, text of li
tags aligned.
the downside of bullets won't aligned text outside ul
. if want align other text can use margin.
ul li { /* * want bullets outside of list, * text aligned. actual bullet * outside of list’s container */ list-style-position: outside; /* * because bullet outside of list’s * container, indent list entirely */ margin-left: 1em; }
edit 15th of march, 2014 seeing people still coming in google, felt original answer use improvement
- changed code block provide just solution
- changed indentation unit
em
’s - each property applied
ul
element - good comments :)
Comments
Post a Comment