Zero indent for list items.
My code is structured as follows:
<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, it’s terrible that css should be in html , but don’t worry about it now.
This will result in Egypt gaining the property text-indent <article>. However, I would like this to not happen. I would like to have 0 text indent in the list item in Egypt!
How to do it?
Check js-fiddle .
+4
3 answers
Move text-indent: 0pxto liinstead a, as in the snippet below.
text-indent . li - , a , , a .
, , li 40px article. , li "" .
<article style="font-size:16px;text-indent:40px;line-height:1.5em;">
<p>
Goal of this page is to laconically detail where I, <strong>Georgios Samaras</strong> have travelled, since I am asked again and again and usually I forgot some places.
</p>
<p>
I will list (in random order) were I have been to and say some more about the non-Greek places I have been after 2012. It also good to write down the memories... :)
<ul>
<li style="text-indent: 0px;"><a title="Egypt" href="#egypt">Egypt</a>
</li>
</ul>
</article>+7
, p
<article>
<p style="font-size:16px;text-indent:40px;line-height:1.5em;">Goal of this page is to laconically detail where I, <strong>Georgios Samaras</strong> have travelled, since I am asked again and again and usually I forgot some places.
</p>
<p>
I will list (in random order) were I have been to and say some more about the non-Greek places I have been after 2012. It also good to write down the memories... :)
<ul>
<li><a title="Egypt" href="#egypt">Egypt</a></li>
</ul>
</article>
+4