SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2004
    Location
    Boise, Idaho
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Box Model Hack & IE5.x/mac

    Hello,

    I was trying to solve a positioning problem on IE6/win by using the simplified box-model hack. It worked, but now I seem to have a problem in IE5/mac. Is there any way to have this site work for both? (It looks fine in Mozilla, as far as I can tell, on both browsers.)

    Here's the site: Humanophone

    Here's the code in question:

    /*--- LEFT SIDEBAR ---*/
    #leftmenu {
    background-color: #999;
    position: absolute;
    left: 0px;
    top: 88px;
    width: 180px;
    text-align: right;
    padding: 0px 10px 30px 20px;
    }
    /* SBMH -- FIX IE PADDING AND WIDTH ISSUES (Simplified Box Model Hack) */
    * html div#leftmenu {
    top: 88px; /* for IE5.x/win */
    t\op:96px; /* content width (for other IE) */
    }

    IE5.x/mac unfortunately doesn't screw up the way IE5.x/win does, so it reads right through to the 96px positioning & puts 8 pixels of extra space into the layout. It also gives me a horizontal scrollbar & refuses to display background color all the way to the right margin.

    Any way to code this in CSS so it displays correctly in all IE browsers?

    Thanks for your help--

    Janet

  2. #2
    SitePoint Enthusiast maetl's Avatar
    Join Date
    Jan 2003
    Location
    Aotearoa
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't seen the box model hack applied to absolute positioned left/top values before, only on widths, as width calculation is the problem that the technique trys to counteract.

    there is another way of implementing the hack:

    #leftmenu {
    top:96px;
    top/* */:/**/88px;
    top:/**/88px;
    }

    one other suggestion is to try using an XHTML strict doctype, and see how that interacts with IE5/mac.


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
  •