0

私はHTMLとCSSを使って約5年になりますが、これで完全に途方に暮れています。http://napletonlaw.connectionsquad.com/

そのページでは、そのコンテナにClarityのIDを持つ単一のdivがあります。

私は次のようなCSSルールを持っています:

#clarity {
text-align: center;
width: 320px;
}

そのためのコードは次のとおりです。

<div id="clarity">
            <img src="Resources/magnifying-glass.png" />
            <p>You have questions, and we have answers.  We can help break down the situation into easy-to-understand terms and clear advice. Napleton Law is here to help you!</p>
        </div>

何らかの理由で、そのDIVに適用する幅が使用されていません... dreamweaverのプレビューではdivが320pxに縮小されますが、プレビューすると縮小されません。幅320px..。

4

2 に答える 2

6

前のルールに、問題の原因である可能性が高い角かっこがありません。

#container {
    width: 960px;
    height: 800px;
    margin: 0px;
    position: relative;
    z-index: 100;
    background-color: #a0a0a0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 1; <--- Missing bracket
    -moz-box-shadow: 0 0 10px rgba(0,0,0,1);
}
#clarity {
    text-align: center;
    width: 320px;
}
于 2012-10-23T17:11:00.377 に答える
0

スタイルにCSSエラー、角かっこがありません-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 1;

#container {
    width: 960px;
    height: 800px;
    margin: 0px;
    position: relative;
    z-index: 100;
    background-color: #a0a0a0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 1);  //Added a missing bracket here.
    -moz-box-shadow: 0 0 10px rgba(0,0,0,1);
}
于 2012-10-23T17:12:54.683 に答える