Results 1 to 5 of 5

Thread: list text indent, second line

  1. #1
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default list text indent, second line

    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!
    Last edited by Snookerman; 05-20-2009 at 07:33 AM. Reason: correct the space before indent was not shown (sp3125532) added “Resolved” prefix (Snookerman)

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Using padding should work in this case, could you please post the code you have tried or a link to the page?

  3. #3
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the reply!


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

    HTML Code:
    <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>

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Code:
    <dl>
    needs to be changed to
    Code:
    <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.

  5. #5
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Got it!
    Thanks for the advice

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •