how to indent single lines??

Discussion in 'Web Design and Development' started by yojitani, Apr 23, 2007.

  1. yojitani macrumors 68000

    yojitani

    Joined:
    Apr 28, 2005
    Location:
    An octopus's garden
    #1
    Maybe it's late and there's something really basic I'm forgetting, but how do you indent single lines - NOT first lines - of text without using  

    To explain, I'm doing webwork for a literary magazine and I'm having a hell of a time formatting poetry that has 'unusual' indents. the indented lines can't break with proceeding lines so something like <p style="text-indent" > won't work of course because the <p> creates unwanted space..

    I'm using dreamweaver 8 - though I tend to do about 70 of the work in code. Any tips on how to do this would be most appreciated!!
     
  2. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #2
    I'm not sure if I get your question, but perhaps you can try wrapping around tag such as <span style="text-indent">?
     
  3. Trogloxene macrumors regular

    Joined:
    Apr 17, 2007
    #3
    Yea, I think Dreamweaver indents by paragraphs, not by lines. One solution is to make a table with two rows. Indent one row and not the other.

    -T
     
  4. justG macrumors member

    justG

    Joined:
    Apr 9, 2007
    Location:
    Orlando, FL, US
    #4
    So make it not create unwanted space, that's why we have CSS. You can remove the unwanted space by creating a style block that specifies 0 margin/padding. Creating a table is never an option to solve a layout issue if you're at all concerned with semantic code (sorry, Trogloxene, but it's just not).
    Code:
    span.indent {
      padding-left: .2em;
    }
    
    <p>
      Little Miss Muffet<br />
      <span class="indent">sat on a tuffet</span><br />
      ...
    </p>
    
     
  5. nicksoper macrumors member

    nicksoper

    Joined:
    Mar 6, 2006
    Location:
    Cape Town
    #5
    <ul>

    Do you not want to be using a <ul> indented text </ul> ?

    You could even make different indented styles in the style sheet:

    <ul class="poem1">indented text</ul>

    You can set the default indent with a ul{padding-left:10px;} and you can then add more styles as you wish.

    Kinda wierd question, not sure if this is the right answer.
     
  6. yojitani thread starter macrumors 68000

    yojitani

    Joined:
    Apr 28, 2005
    Location:
    An octopus's garden
    #6
    doh! yes, that's what I was thinking of! Thanks!! and thanks the rest of you too (though Trogloxene, listen to JustG)


    (need more sleep!)
     

Share This Page