Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Implementing the box-sizing polyfill by Christian Schepp Schaefer in wordpress

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #151341
    terungwa
    Participant

    I used the box-sizing polyfill by Christian Schepp Schaefer to implement a natural box layout model solution for IE7 and it worked fine.

    I needed to used the static template as a base for a wordpress theme, and I realised there is no way to enqueue the boxsizing.htc file in wordpress.
    My wordpress layout gets pretty messed up in IE. Is there a way to enqueue this file?

    Any ideas are appreciated.

    #151345
    Alen
    Participant

    You would need to upload the file to your theme folder. Then just include it in your CSS.

    *{
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    *behavior: url(http://path/to/script/boxsizing.htc); }
    

    Read here: https://github.com/Schepp/box-sizing-polyfill
    And here: http://reference.sitepoint.com/css/behavior

    (Code not tested)

    #151348
    terungwa
    Participant

    Thanks Allen. In the static page, this is the code snippet i used and it worked perfectly well in IE too: myhtmlelements{
    margin-left: 1.0416666666666666666666666666667%;
    margin-right: 1.0416666666666666666666666666667%;
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit /
    -moz-box-sizing: border-box; /
    Firefox, other Gecko /
    box-sizing: border-box; /
    Opera/IE 8+ /
    *behavior: url(js/boxsizing.htc);} /
    natural box layout model solution for IE7 */

    But in converting the template to a wordpress theme, IE is not finding the code, to behave as expected.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.