SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist dhtmlhelp's Avatar
    Join Date
    May 2003
    Posts
    575
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with overflow: hidden

    Hi,

    I am using overflow: hidden for text resize inside a div with border 1. However, when I resize the font to largest and above the border disappears. Is there a way of hiding only the text that overflows, and not the border as well?

    DH

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Can you show us an example page?

  3. #3
    SitePoint Evangelist dhtmlhelp's Avatar
    Join Date
    May 2003
    Posts
    575
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    it's a simple div with border-width: 1px; width: 174px; and a long word inside like 'intellectualise'. overflow is set to hidden. When I resize the font, the overflowing part of the word intellectualise is hidden (from pixel 175 onwards) but also the border is hidden.

    Has anyone come across this problem before?

    DH
    Last edited by dhtmlhelp; May 27, 2003 at 11:59.

  4. #4
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dhtmlhelp
    Has anyone come across this problem before
    Nope

    But an alternative might be to set the width of your div in em. That way, if you increase your font size, so would the div's width.

    Also make sure you test this in a few different browsers, support for 'overflow' is kinda iffy. It is interpreted in different ways by different browsers.

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac


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
  •