10

A solution has been proposed for making Zurb's Foundation 3 Framework work with IE7. Not necessarily complicated support, but certainly grid support.

Solution is presented as: http://www.stormconsultancy.co.uk/blog/development/code-snippets/making-zurb-foundation-3-work-on-ie7/

I've tried to replicate this here: http://sausag.es/foundation/grid.html

I've added a link to the htc file in my foundation.min.css

The reference is relative to the HTML, not the CSS.

I've added a line in htaccess about the htc file.

But still I cannot get the grid to show in IE7 as it does in IE8. Where am I going wrong?

2 Answers 2

7

The following line in your stylesheet:

*behavior: url(/stylesheets/box-sizing.htc);

translates to the following address:

http://sausag.es/stylesheets/box-sizing.htc

which returns a 404. You could fix this by changing the line to:

*behavior: url(/foundation/stylesheets/box-sizing.htc);

or by moving the box-sizing.htc file down one folder.

1
  • 2
    Face. Palm. Thanks ACJ. I couldn't see the wood for the trees. Oct 8, 2012 at 20:22
7

Another solution would be to detect ie7 with conditional comments and then apply a CSS fix for columns like this:

.ie7 .columns{
    margin-right: -15px ;
    margin-left: -15px ;
    display:-moz-inline-stack;
    display:inline-block;
    zoom:1;
    *display:inline;
}

This clears the padding on the columns and fixes the grid. you can do the same on other divs or parts of the layout.

Also, you will need to fix the centered columns and the offset-by columns like this:

.ie7 .row{
    clear: both;
    text-align: center;
}

.ie7 .offset-by-three {
    margin-left:25% !important;
}
.ie7 .offset-by-seven {
    margin-left:58.33% !important ;
}

And of course the conditional comments:

<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if IE 7]>    <html class="ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
1
  • Thank you!! I have a fairly simply styled site that just had a large number of elements, and boxsizing.htc was dragging performance way down. This is so much better performance-wise, but does require fixing some things here and there. Apr 18, 2013 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.