Click here to Skip to main content
15,885,106 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have ul and li tag. Inside full ul tag i had text-indent only for first li. for a long text with first li, it wraps text this is good but the wrapped text didn't have text-indent. I goggled for this but any code and logic suggested won't work for me. This content is dynamic.


HTML
<ul class="dynctrl_hidden dynctrl_padding" style="display: block;">
        <li style="text-indent: 25px;">Endoscopic mucosal resection (EMR)</li>
        <li>  <input type="checkbox" name="Endoscopic mucosal resection (EMR)" class="dynctrl_hidden dynctrl_padding" id="test" style="display: block;"></li>
<br clear="all"></ul>


 This produces the result the below 
Endoscopic mucosal resection  "checkbox" here
(EMR)
But i want the below one
Endoscopic mucosal resection (EMR) "checkbox" here


CSS
.dynctrl_padding{
text-indent: 25px;
}
.dynctrl_padding{
width: 250px;
float: left;
margin-right: 2px;
}
.ul{
list-style: none;
}

li{
display: list-item;
text-align: -webkit-match-parent;
}
Posted
Updated 9-Aug-15 19:38pm
v3

1 solution

Why don't you try
padding-left
instead of
text-indent
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900