SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Nov 2001
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about forcing word wrap in a DIV tag

    I'm trying to display long lines of text (no spaces) in a div tag, but browsers tend to not wrap text with no spaces. Is there a way to force the tag to wrap with CSS? I can't get Overflow to do anything and I don't want to go messing up my nice code with tables.

    TIA

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well in CSS, you could make the DIV have a fixed width of say, 300px (or whatever) or you could use <br> in HTML to force line breaks.

    Sketch
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Addict
    Join Date
    Nov 2001
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can't do that

    The problem with thatis that this DIV tag has to be flexible width (it's the middle column in a 3-column layout and I like it being flexible) and as such the word wrap should occur at a different place for each browser width.


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
  •