SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2003
    Location
    constance, germany
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A fixed-width container...

    Bonjour.

    Is it possible to define a container (a <div>) which is fixed in its width, although the content inside is 'wider'? I do know "overflow: hidden", which is not exactly what I want; e.g. if there is a 'word' in that container exceeding its width, it should not be clipped and hidden, but be "wrapped" at the end of the container.

    Is this possible?

    Merci.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by janosch
    Bonjour.

    Is it possible to define a container (a <div>) which is fixed in its width, although the content inside is 'wider'? I do know "overflow: hidden", which is not exactly what I want; e.g. if there is a 'word' in that container exceeding its width, it should not be clipped and hidden, but be "wrapped" at the end of the container.

    Is this possible?

    Merci.
    A fixed-width container will always wrap a long word to the next line, unless the word is wider than the container itself. Honestly, the best solution is to break the long word yourself, either via server-side programming (if your text is dynamically generated, like from a database), or (if your long word is in HTML) to manually break it. Do you have an online example of what you're trying to achieve?

  3. #3
    SitePoint Member
    Join Date
    Oct 2003
    Location
    constance, germany
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, actually not. But I was talking about 'words' that are wider than the container; so my question seems to be answered -- I will have to break these words server-side ;-)

    Thanks.


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
  •