「IE セパレート スタイル シート」などを Google で検索すると、読み物はたくさんありますが、例は多くありません。
メイン スタイルの直後に、IE7 用の次の条件付き CSS があります。
margin-top
IE7でもっと大きくしたいです。
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<!--[if IE 7]>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/ie7.css" media="screen" type="text/css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/ie8.css" media="screen" type="text/css" />
<![endif]-->
メインのスタイルシートには次のものがあります。
.outerBlue_s {
width: 230px;
height: 260px;
overflow: hidden;
color: #FFF;
border-radius: 10px;
box-shadow: 5px 5px 2px #cccccc;
-moz-box-shadow: 5px 5px 2px #cccccc;
-webkit-box-shadow: 5px 5px 2px #cccccc;
margin:0 auto;
text-align:center;
font-size:18px;
vertical-align:middle;
IE スタイルシートでは、目的のマージンのみを設定しました。
.outerBlue_s {
margin-top:50px;
}
これを行っているにもかかわらず、IE7を確認するとマージンが変化していません。
ヘルプやアドバイスをいただければ幸いです。
<link rel="stylesheet" type="text/css" media="all" href="http://fafaradesigns.com/wp/wp-content/themes/fafaradesigns/style.css" />
<!--[if IE 7]>
<link rel="stylesheet" href="http://fafaradesigns.com/wp/wp-content/themes/fafaradesigns/ie7.css" media="screen" type="text/css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" href="http://fafaradesigns.com/wp/wp-content/themes/fafaradesigns/ie8.css" media="screen" type="text/css" />
<![endif]-->
ie7 シートが参照されているようには見えません。私は何を間違っていますか?
個々のページに条件付きスタイルをインラインで配置することで、ハックに行きました。
<!--[if lt IE 8]>
<style>
.innerBlue_c {
margin-top: 1.5em;
}
</style>
コードがきれいになるように、外部の別のieスタイルシートを使用したかったのですが、なぜ機能しないのかわかりませんでした。条件ステートメントが間違っているように見えましたか?