CSS: max-widthをIE6で使う

私はこんな使い方をしてます。

img {
  max-width: 100% !important;
  height: auto !important;
  width: expression(this.width > 540 ? 540: true); /*for ie6*/
}

これはウェブログへ画像を配置するときに画像サイズがコンテンツボックスを上回る時はサイズを調整して収まるようにするものです。

This entry was posted in HTML/CSS and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">