SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image wrap problem...

    I have a box like this:

    HTML Code:
        #right-slide {
                   position: absolute;
            z-index: 0;
            left: 830px;
            width:160px;
            height:1500px;
                text-align:center;
            background:#333333;
            border-left:2px solid #ccc;
            }
    I want to add a smooth border at the top, so I added an image. I want the image to cover the 160 pixels of the box width + the 2 pixel border. So here's my picture:

    HTML Code:
        #right-swing {
            position: relative;
            z-index: 1;
            right: 2px;
            width: 162;
            height:75px;
            }
    It works everywhere except in IE6. IE 6 just adds 2 pixels to the width of the box...
    So if I make the border 10 px, and the picture 170 px, IE 6 will add 10 pixels to the box...

    How can I solve this?

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this.
    Code:
        #right-swing {
            position: relative;
            margin-left: -2px;
            width: 162px;
            height:75px;
            }
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey! it works!

    thank you


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
  •