1
メニューのテキストの色を変更しようとしていますが、カラータグとテキストの装飾カラータグを試しましたが、どちらも機能しません。ここでは、私が働いているものですCSShtmlでテキストの色を変更できない
#meny {
position: absolute;
top: 201px;
left: 290px;
width: 800px;
height: 50px;
text-align: center;
position: fixed;
top: 201px;
width: 60%;
display: flex;
font-weight: bold;
font-size: smaller;
color: #cccccc !important;
}
#meny a {
line-height: 50px;
flex: 1 0 auto;
font-family: verdana;
text-decoration: none
}
<!doctype html>
<html>
<head>
<title>Markveien legesenter</title>
<meta charset="utf-8">
<link href="medic.ico" rel="icon" type="image/x-icon" />
<link href="stil.css" rel="stylesheet">
</head>
<body>
<div id="header">
<img src="del2.jpg">
</div>
<div id="bilde">
<img src="del1.jpg">
</div>
<div id="meny"> <a href="#">HJEM</a><a href="#">OM OSS</a><a href="#">SLIK BESTILLER DU</a><a href="#">INFORMASJON</a><a href="#">LENKER</a>
</div>
</body>
</html>
'meny'は' menu'ですか? –
ブラウザで要素を調べると、その要素に影響を与えるCSS規則が表示されます。これらのルールよりも何かが優先されるかどうかを確認してください。 'meny'がクラス名であれば'が必要です。 '前に。それがidなら、あなたは '#'が必要です。実際にメニュータグの場合は、それに応じて更新する必要があります。 – scrappedcola
あなたのhtml –