Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Banned
    Join Date
    Feb 2011
    Posts
    76
    Thanks
    10
    Thanked 0 Times in 0 Posts

    image display problem (overflow css)

    So I have a div and when things overflow (ie <span> or <p>) I want it to display them, and if they are images, I want to hide them (if they escape the div).

    The div is named #content.

    I tried this, but it didn't work:

    Code:
    #content img{
    overflow:hidden;
    }

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello blue52,
    Maybe you could set a min-width on your images? I'm not aware of any way CSS can differentiate between img or text overflow. Anything that goes outside it's container is going to be viewed as overflow.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Banned
    Join Date
    Feb 2011
    Posts
    76
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Well it's a slideshow.

    On some of the images, when they load they jump down for a second below the div.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Please post a link to your page.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Banned
    Join Date
    Feb 2011
    Posts
    76
    Thanks
    10
    Thanked 0 Times in 0 Posts

  • #6
    Banned
    Join Date
    Feb 2011
    Posts
    76
    Thanks
    10
    Thanked 0 Times in 0 Posts
    I really need some help with this.

    #content{
    overflow:hidden;
    }

    this works perfectly fine, but for some reason when I make it

    #content img{
    overflow:hidden;
    }

    it stops doing anything.

    i really need help with this fast

    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •