SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: CSS Word Wrap

  1. #1
    SitePoint Member
    Join Date
    Jun 2001
    Location
    California
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Word Wrap

    I made some text and positioned it with CSS. For some reason if i move it to, say the middle of the screen, it wraps the words, if i place it more to the left it doesn't wrap. How do i keep it from wraping at all? I want it static.

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try posting this in the "adding some style" category from the Web Design section...it should help more.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kuba...it depends on the method that you used to position the text. It sounds like you did this:

    DIV { position: absolute; left; top:y; }

    But if you do that, all that happens is your box still expands to the right. The further to the left your box is on the page, the more the text will expand to the right. If you want your text to wrap at the edge of the DIV, then you need to specify a width for the DIV like so:

    DIV { position: absolute; left; top:y; width:z; }
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    SitePoint Member
    Join Date
    Jun 2001
    Location
    California
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thank You

    It works perfectly now. Thanx a lot!!!

    -Kuba

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    right on...glad I could help.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could a;lso set the style:

    white-space : no-wrap;

    its the same as <td nowrap>
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


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
  •