www.webdeveloper.com
Results 1 to 15 of 15

Thread: Help with text alignment

  1. #1
    Join Date
    Apr 2005
    Posts
    7

    Help with text alignment

    Hi Everyone,

    I am new here. I hope you can help.

    I just started to learn about HTML and I am doing
    ok. I have one problem, I can't figure out how to
    align text in paragraph form in a spot over to the
    right. I will show you what I mean.

    Example HTML email jut the look no tags.
    I need to know what tags to use to make
    my Paragraphs look like this.

    Hi Anyone,

    JHFFFUYGJHJYUIYSUGYFSUYF
    FYFUYFUYFUYFUYFYFHHHFJH
    HFFFJHFLHJFKJHGHFJHFHJFHF
    GHGJKJGJGUJGKJGJGKJGKJKJKJ

    hfhdfsjfhasjdfhsjdfhdhf
    hsahfhshdfhsadhfahsg
    See how the second paragraph is over to the
    right a little. I need to now how to get the
    text all neatly line up line for line like this.

    I hope I have explained myself enough.

    Any help would be appreciated.

    Sabrina
    Last edited by conroys; 04-06-2005 at 11:40 PM.

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    You don't use tags, you use styles. The first paragraph has a width and a left margin of zero while the second paragraph has a considerable left margin and possibly no defined width.

  3. #3
    Join Date
    Apr 2005
    Posts
    7
    Thanks for the quick response. How do I do that?.

    Sorry i'm new to HTML but I pick up pretty quick.

    Thanks again,

    Sabrina

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Here's one way to do it:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>layout</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
    <div style="width:70%;">
        <p style="margin-right:50%;">JHFFFUYGJHJYUIYSUGYFSUYF FYFUYFUYFUYFUYFYFHHHFJH HFFFJHFLHJFKJHGHFJHFHJFHF GHGJKJGJGUJGKJGJGKJGKJKJKJ</p>
        <p style="margin-left:50%;">hfhdfsjfhasjdfhsjdfhdhf hsahfhshdfhsadhfahsg</p>
    </div>
    </body>
    </html>
    Read the (x)html and css tutorials

  5. #5
    Join Date
    Apr 2005
    Posts
    7
    I am writing a HTML email and through out the email I need certain
    paragraphs to be indented about 10 spaces in. How do I do this?

    I tried the above code and it didn't work.

    Thanks
    Sabrina

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    <p style="margin-left:10em;">10 spaces in</p>

  7. #7
    Join Date
    Apr 2005
    Posts
    7
    Thank you! I have one more question. I don't want to have spaces
    between the lines, can I just use <br> instead?

    Thanks Again Fang,

    Sabrina

  8. #8
    Join Date
    Apr 2005
    Posts
    7

    This message is for Fang or anyone who can answer

    Hi Fang,

    I just wanted to know what tag I need
    to use so there are no spaces between
    the lines. I tried the br tag but it didn't
    help.

    A response to this would be greatly appreciated
    as I am waiting for this one request before I can
    continue with my email.

    Thanks a head of time,

    Sabrina

  9. #9
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    so there are no spaces between the lines
    could you explain this a bit more.

  10. #10
    Join Date
    Apr 2005
    Posts
    7
    Hi Fang,

    I want my email to format like this example.

    I want it to be a universal format for all email
    account providers. I was told I should use tables
    but I don't know how to do that with this kind of format.

    The code you gave me worked for the format but there was
    a space between each sentence in my email and I did not want
    a space in between sentences.

    I hope this helps you understand what I am trying to accomplish.

    Thanks for your help again,

    Sabrina


    fgfhdhghgfhghgfhjfhgdfgfhfhghjfgsdjhgh
    gfhgfgdfhgsdfhghdgfjhgdfjhgdfhjgdfjgdhf
    ffgsdhfgjhsdgfhsgdfjhgsdhfgjhsgdfhsgdfh
    gfhgfhgfhjgfhgjhgfhsggfjsdgfhsdgfjhsdgfh

    A.gfshdgfhsdghsgdfhgfjhghghhgghh
    fkgfhgdfhghdfghjgfjhsgdfhbvnbnn
    dfgsdhgfjhsdgfjhsdfhgfdhfgfhhdsg
    fghjfghsdgfhsdgfhsdghh
    hdfdfhjhfjhfjhdfjhsdjfhjsd
    fjhfjfjhfjhsdfjhjshfjsdhfjsj
    jjsdgjhgfdhgsdjfhgjsdhgfjhsdgfjhhsdfgjh
    dsfggdfhsagdfjhgsdflhgksdgfkhsgdfhgjh
    jfkgsdkfugskdfgkjgsdfjgskjdgfkjsgdfkjsdkfj

    This is how I want it to look.

  11. #11
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    That's how it WILL look as long as there is enough text to be formed into paragraphs.

  12. #12
    Join Date
    Apr 2005
    Location
    Bathurst, NSW, Australia
    Posts
    3,357
    <blockquote></blockquote>

  13. #13
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Quote Originally Posted by bathurst
    <blockquote></blockquote>
    Would that really be apropriate?
    http://www.w3.org/TR/WCAG10/#gl-structure-presentation
    3.7 Mark up quotations. Do not use quotation markup for formatting effects such as indentation. [Priority 2]
    For example, in HTML, use the Q and BLOCKQUOTE elements to markup short and longer quotations, respectively.

  14. #14
    Join Date
    Apr 2005
    Posts
    7
    I just want to thank everybody for there help
    and ask your opinion. I am creating these html
    emails and I heard that not all email account
    provider will read my code properly. I was told
    if I use tables this will safe for all html emails I send
    out. Is this true? what are others using to make sure
    the emails are read properly.

    Thanks,
    Sabrina

  15. #15
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    To make sure they're read properly, I send my emails as text/plain.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles