Log in

View Full Version : Resolved list text indent, second line



sp3125532
05-18-2009, 02:43 AM
Hi, I have a problem with the li text-indent
The first line is indented without problem, but the following lines are not indented.

* adababba
dafsdfaffdff
dafdfadfadf

* dfasdjflkaf
dslfajflkjd;fa


Tried display: block, margin, padding, all gave me the same as above.
What should I add to make it look like below?


* dfadfadfd
[ ]dslafkjadflk
[ ]adfsdfdfa

* dalkjfldsfja
[ ]aldjfa;ldkjf

Thanks!

Snookerman
05-18-2009, 05:33 AM
Using padding should work in this case, could you please post the code you have tried or a link to the page?

sp3125532
05-18-2009, 05:32 PM
Thank you for the reply!


Here is my simplified code.
It gives the same results.


<html><head>
<meta http-equiv="content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body {
background :#fdfdd6; color:#a1a190;
font-family: 'Microsoft Jhenghei', sans-serif; font-size :9pt;
margin:0;padding:0;height:100%
}
.table_content {
float: right;
display: block;
background-color:#e9e7b8;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
padding: 8px;
width: 18.5%;
}

.table_content_level2 {padding-left: 1em;}
.table_content_level3 {padding-left: 1.5em;}
.table_content_level4 {padding-left: 2em;}
</style>

<TITLE>title</TITLE></head>
<body>
<div id="container">
<div id="sub_text">
<dl class="table_content">
<li class ="table_content_level3">
<a href="#anc1">title aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</a>
</li>
<li class ="table_content_level3">
<a href="#anc2">title bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</a>
</li>
</dl>
<h3 id="anc1">Title A</h3>
<p>p1p1p1p
<h3 id="anc2">Title B</h3>
<p>p3p3p3p3p
</div id="sub_text">
</div id="container">
</body>

boogyman
05-18-2009, 06:06 PM
<dl>
needs to be changed to

<ul>

text-indent will only indent the first line. It's meant to be used as a paragraph type separator. margins/padding will create the type of indents for which you are searching.

sp3125532
05-20-2009, 03:01 AM
Got it!
Thanks for the advice