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 has lie upon , 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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -