SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple CSS question - text-wrap

    Hi All,

    I'm self-admittedly horrible at CSS. I have a quick question regarding text wrap.

    I'm designing a mock up page here: http://anchoring.com/css-prob.html

    On the left hand column, where it says "Everything else boatingggg", I want the boatingggg to be forced to a new line rather than overlapping. How do I do this? I believe it involves addin white-spacere-line; somewhere, but I'm really not sure where.

    Feel free to criticize the semantics of the rest of the CSS as well

    Thanks in advance.
    www.ChineseImporting.com Guide to importing products from China.

  2. #2
    SitePoint Mentor silver trophybronze trophy

    Join Date
    Feb 2008
    Location
    Preston, Lancashire
    Posts
    1,378
    Mentioned
    72 Post(s)
    Tagged
    1 Thread(s)
    The text appears to be part of an image. You can't break an image to another line. You have to have the text as text, it would also reduce the file size of your web-page.
    follow me on ayyelo, Easy WordPress; specializing in setting up themes!

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,513
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You have explicitly told the browser not to wrap with white-space:nowrap in your left-categories div.

    However removing it will not allow a string of unbroken text to wrap but will allow normal words with gaps to wrap.

    You will need to use word-wrap:break-word to break the unbroken text:

    e.g.

    Code:
    #categories-left{
    white-space:normal;
    word-wrap:break-word;
    }

  4. #4
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome. Worked like a charm. Thanks Paul.
    www.ChineseImporting.com Guide to importing products from China.


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
  •