WordPress.org

Ready to get started?Download WordPress

Forums

IE CSS MaxWidth (6 posts)

  1. piginzen
    Member
    Posted 9 years ago #

    I am using the MX4 theme and the max-width css tag associated with an image is not working with IE...

    Is there a work around someone has found?

    Thanks

    this is what i have in my header.php:
    <style>
    entry img {width:expression(if(this.clientWidth>300)this.width=300);}
    </style>

    and this is in my css:
    .entry img {
    background-color: #ffffff;
    border: 1px solid #dddddd;
    /*-moz-border-radius:5px;*/
    padding: 4px;
    max-width: 334px;
    }

  2. Orin
    Member
    Posted 9 years ago #

    Unfortunately, IE just doesn't support some properties. One of those is max-width. Another is clip, as I discovered. Not much can be done about it.

  3. joeedmon
    Member
    Posted 9 years ago #

    Check out RJO for some examples of what's possible without having IE support for max-width.

    There is also a special script language that MS uses called 'expression' that fits into your CSS. I used it a few years ago for a situation similar to yours. I think it's just a way to pass on a javascript command to CSS. Unfortunately, I can't find that little code snippet anymore. It worked like a charm though.

  4. vkaryl
    Member
    Posted 9 years ago #

    There's also a javascript: minmax.js. Works great, if you want it let me know and post an email, I'll send it to you.

  5. moshu
    Member
    Posted 9 years ago #

  6. vkaryl
    Member
    Posted 9 years ago #

    Could be, don't know for sure. I got it from kickass....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.