SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: CSS Line Indent

  1. #1
    SitePoint Guru
    Join Date
    Jul 2002
    Location
    space
    Posts
    845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Line Indent

    Hello,

    I have text like this:

    TEXT A
    TEXT B
    TEXT B
    TEXT B

    How do I make Text A indented?

    And how do I make Text B indented even more?

    Thanks.

  2. #2
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by johnny190
    How do I make Text A indented?
    And how do I make Text B indented even more?
    You might want to try a definition list or you could do a unordered list with classes applied to specific list items... or you could possibly used advanced selectors.

    Depending on content, I would go with a DL.

    Code:
    /* Real real quick example: */
    dt { padding-left: 10px; }
    dd { padding-left: 20px; }

  3. #3
    SitePoint Guru
    Join Date
    Jul 2002
    Location
    space
    Posts
    845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mhulse
    You might want to try a definition list or you could do a unordered list with classes applied to specific list items... or you could possibly used advanced selectors.

    Depending on content, I would go with a DL.

    Code:
    /* Real real quick example: */
    dt { padding-left: 10px; }
    dd { padding-left: 20px; }
    But how would I call that? Text A and Text B are both in a table cell, already using a class.

    So would I just go <span class="dt">Text A</span>

    and <span class="dd">Text B<br>Text B</span> ?

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would use a definition list and put it in the table cell.

    Here's an example of a definition list:

    HTML Code:
     <dl>
      	<dt><strong>BOHICA</strong></dt>
      	<dd>
     		<em>Slang</em>  Military acronym meaning &quot;Bend Over, Here it Comes Again!&quot; Commonly used by infantrymen to warn friendly forces of incoming enemy fire. Also the name of a bar in Chicago, Illinois.
      	</dd>
      </dl>  

  5. #5
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BOHICA
    Lol! Nice one. Hehe, never heard that one b4. But, I guess not so nice for the guys/gals that are actually having to say BOHICA.


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
  •