SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using <br /> between text

    My friend asked me to convert a doc file he sent me into html.
    He said he wanted it to look exactly like the doc.
    So I put <br /> in between the lines so the text appears like the one in doc.
    But he says now the text looks weird.
    Is it because I used <br />?
    Is text wrapping automatically done?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If he wants it to appear like the doc, then put the doc file online.

    Webpages are not Word documents. They're not 8.5x11" pages with margins, they're whatever size the user's screen happens to be, and yes, text wraps automatically to fit its container.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,297
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    @virtualmisc

    Yes Dan is quite right... although you could at least approximate the layout if you really want to. You can mark up each paragraph with <p> tags, set the paragraph spacing to match the Word spacing, set a width on the text container in ems and set the font-size in ems.

  4. #4
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of using the break tag, you could just have a css fixed layout with a width of 8.5", and then put each paragraph in a paragraph block.

  5. #5
    SitePoint Guru silver trophy JamesColin's Avatar
    Join Date
    May 2009
    Location
    Jomtien, Pattaya, Thailand
    Posts
    910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you shouldn't use BR to break lines in the middle of sentences.
    Do you really need traffic? Where to? What for?
    If you really do need traffic then stop messing around!
    Advertise on my sites today: She Told Me & Best Reviewer :
    200,000+ UV / Month


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
  •