プロが教える店舗&オフィスのセキュリティ対策術

始めまして、過去ログを色々みたのですが、CSSの記述もままならない状態でちんぷんかんぷんです・・
何方か教えて下さい。

CSSを使いソフトはdreamweaverを使っているのですが
左右の余白を指定した背景を使い、真ん中にメインコンテンツを置きたいと考えています。
Dreamweaverで試行錯誤し、やってみたのですが、dreamweaver上では思ったとおりに行くのですが、IEで見てみると真ん中のメインコンテンツ部分がなくなっており、全て背景になってしまいました・・・お手上げ状態です。
タグは
--html--
<title>○○</title>
<link href="Untitled-3.css" rel="stylesheet" type="text/css">
</head>
<body style="margin:0">
<div style="background-color:FDE9FC;width:550px;height:800px;margin:auto">
<img src="top.gif" alt="○○" width="550" height="150"></div>
</body>
</html>

--CSS--
body { background-image: url(kabe_bsp111.gif); background-color: #FFFFFF; background-repeat: repeat-y,x; margin-left: 35px; }
です。

また、普通に見れてるdreamweaver上で、メインコンテンツ部分の一番上に画像を張り、画像の下に文字を打つため改行をすると、最上部の画像の上に余白ができてしまいます。
この現象もまったくもって??です。

何方かこんな無知な奴にお力を貸して下さい・・・
先輩方よろしくお願いします!!

A 回答 (1件)

こんにちは。


--html--
<title>○○</title>
<link href="Untitled-3.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<img src="top.gif" alt="○○" width="550" height="150">
</div>
</body>
</html>

--CSS--
body {
margin: 0;
padding: 0;
text-align: center;
background: #ffffff url(kabe_bsp111.gif) repeat 35px 0px;
}
#container {
width: 550px;
background: #FDE9FC;
height: 800px;
margin: 0 auto;
text-align: left;
}
かな?
IE対策にbodyにtext-align:centerを指定し、中央寄せしています。
    • good
    • 0

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