dポイントプレゼントキャンペーン実施中!

お世話になっております。
以下のソースのように、ページを左カラムと右カラムに分けて上から下までカラムをheight:100%にしているます。右カラムの左にボーダーをドットで入れているのですが、IEでは表示されるborderがFirefoxでは表示されません。解決方法をご教授お願いいたします。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio …
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="imagetoolbar" content="no" />
<title>サンプル</title>

<style type="text/css">
<!--
/*全体の設定*/
* {
margin: 0px;
padding: 0px;
font-size: 12px;
font-family:'Georgia', Verdana, Osaka, 'MS P Gothic';
font-weight: normal;
line-height: 150%;
color: #000;
}

/*ページ全体の設定*/

html,body {
height:100%;
}

body {
background-color: #FFF;
}

/*カラムの設定・IE6のハック*/

#wrapper {
width: 1001px;
float:left;
height: 100%;
min-height:100%;
margin: 0px 0px 0px 0px;
overflow:hidden;
overflow: show;
}

body > #wrapper {
height:auto;
}

/*左カラムの設定*/

#left {
width: 340px;
margin: 0px;
float: left;
height: 100%;
min-height: 100%;
padding-bottom: 32768px;
margin-bottom: -32768px;
background-color:#00FF00
}

/*右カラムの設定・IEバグ対策*/

#right {
width: 660px;
margin: 0px;
float: right;
height: 100%;
min-height: 100%;
border-left-width: 1px;
border-left-style: dotted;
border-left-color: #000;
padding-bottom: 32768px;
margin-bottom: -32768px;
position:relative;
}
-->
</style>
</head>

<body>
<div id="wrapper">
<div id="left">
aaa
</div>
<div id="right">
aaa
</div>
</div>
</body>
</html>

A 回答 (1件)

これは【質問番号:5105806】の続きですね?


確かにFirefox3(2は問題なし)ではボーダーが描画されていないのを確認しました。
検証したところ、どうも下記の指定があるせいでこの不具合が起きる様です。

padding-bottom: 32768px;
margin-bottom: -32768px;

#rightからこの2つの指定を削除すると左側のボーダーが描画される様になります。
ただし、そうしてしまうとせっかくのウィンドウの下端までの描画ができなくなってしまいますので、方法を考えました。

この状態だと、"border-left: 1px dotted #000;"の様な1辺だけの指定は効きませんが、"border: 1px dotted #000;"の様な四辺まとめての一括指定だと反映される様です。従って、回りくどいのですが、"border-left: 1px dotted #000;"の替わりに、

border: 1px dotted #000;←一度四辺を一括指定しておいて
border-width: 0 0 0 1px;←左辺以外の太さを0に

…とすると"border-left: 1px dotted #000;"と同じ結果が得られます。


あと、コピペのミスかもしれませんが、

#wrapper {
(省略)
overflow:hidden;
overflow: show;←ここの指定にアンダースコア・ハックが抜けてます。これだとIE6だけでなく、全ての環境で"overflow: show;"の方が有効になってしまいます。
}

ご確認を。
    • good
    • 0
この回答へのお礼

ありがとうございます。
発想の転換ですね…目から鱗でした。
同じ結果を得ることができました。
本当に感謝です。

overflow: show;の部分、コピペミスでした。ご指摘ありがとうございました。

お礼日時:2009/07/09 02:10

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!