SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Banana Man's Avatar
    Join Date
    Dec 2005
    Posts
    391
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    IE 6 Div height problem

    Hi,

    Im having a problem with a div in IE6. When i view it the image is being repeated even though the image height is 11px and the div height is set to 11px.

    The image i am referring to is the top of the blue border boxes that contains all the search result.

    http://www.alternative-health.ie

    .beforebgbox_4
    {
    width:429px;
    background-image: url(../../images/72.jpg);
    height:11px;
    margin-top: 6px;
    }

    Anyone know why this might be happening?

    Thanks
    Last edited by Banana Man; Oct 9, 2007 at 10:23.

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE will always set a minimum height for a div to allow the current text size, even if text is not present. Setting font-size:1px or overflow:hidden in the div's css should fix it.

  3. #3
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or just add
    Code CSS:
    background-repeat: no-repeat;

  4. #4
    SitePoint Addict Banana Man's Avatar
    Join Date
    Dec 2005
    Posts
    391
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Nice one

    I used the overflow:hidden and its working fine now. thats interesting about the div and text size things... didn't know that.


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
  •