html - Zero indent for list items -
my code structured this:
<article style="font-size:16px;text-indent:40px;line-height:1.5em;"> <ul> <li><a title="egypt" href="#egypt" style="text-indent:0px;padding-left: -25cm;">egypt</a></li> </ul> </article>
and yes, terrible css has lie upon html, let's not worry now.
this make egypt text-indent
property of <article>
. however, not happen. egypt, list item, have 0 text indentation!
how it?
check js-fiddle.
move text-indent: 0px
li
instead of a
in below snippet.
the text-indent
property applies block containers. li
block container whereas a
not , hence setting on a
has no effect.
also, property inherited property , reason why li
gets 40px value article
. you'd notice if inspect li
, have @ "computed" styles section.
<article style="font-size:16px;text-indent:40px;line-height:1.5em;"> <p> goal of page laconically detail i, <strong>georgios samaras</strong> have travelled, since asked again , again , forgot places. </p> <p> list (in random order) have been , more non-greek places have been after 2012. it's write down memories... :) <ul> <li style="text-indent: 0px;"><a title="egypt" href="#egypt">egypt</a> </li> </ul> </article>
Comments
Post a Comment