SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast Digitalis83's Avatar
    Join Date
    Nov 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Forcing a line break?

    ok, I have this form where people can tag something on my site. What im trying to accomplish is making a line break when it goes on for too long. For instance, if someone wrote.

    0000000000000000000000000000000000000000

    I would want that to break somewhere in there. Is there a way to do this? HTML or CSS? Thanks!

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    In CSS there's word-wrap:break-word; but it only works in IE. The only other thing that can be done is to sprinkle <wbr> or ­ around that thing, like this:
    Code:
     000000­0000­0000­000000­0000000­00000000­00000
    <wbr> isn't valid HTML though and ­ isn't supported by Mozilla. This is a good article to help you decide what to do: http://www.quirksmode.org/oddsandends/wbr.html

  3. #3
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    In CSS there's word-wrap:break-word; but it only works in IE.
    ...and Safari.

    Who would write "0000000000000000000000000000000000000000" anyway?
    Simon Pieters

  4. #4
    SitePoint Enthusiast Digitalis83's Avatar
    Join Date
    Nov 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually its for tagging. I wanted to use one word tagging. know what i mean?

  5. #5
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What's one word tagging? I can't think of many words that would be as long as that string of 0s you posted.

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    In CSS there's word-wrap:break-word;
    Not in CSS 2.1.
    Birnam wood is come to Dunsinane

  7. #7
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Digitalis83 View Post
    Actually its for tagging. I wanted to use one word tagging. know what i mean?
    Can you explain more please?


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
  •