简体   繁体   English

html不会转到CSS,因此不会更改颜色

[英]html wont go to css and therefore will not change colors

I have below for my code. 我的代码如下。 It is posting it on my entire webpage instead of just on that image and I can't quite figure out why. 它发布在我的整个网页上,而不是仅仅发布在该图像上,我不知道为什么。

 dt { font: Arial, Helvectica, sans-serif; size: .9em; weight: bold; color: (dark red (#6b1101); line-height: 2em; } dd { font: Arial, Helvectica, sans-serif; size: .9em; weight: bold; color: (dark red (#6b1101); line-height: 2em; } #Wrapper { width: 700px; text-align: left; margin: auto; background-color: #F7EED7; } #imgtop { width: 700px; } #leftnav { background-color: #F7EED7; padding: 10px; float: left; width: 150px; } #leftnav a:link { font-family: Arial, Helvetica, sans-serif; font-size: 1em; font-weight: bold; text-transform: uppercase; color: #000033; text-decoration: none; text-indent: 0px; display: block; } #leftnav a:visited { font-family: Arial, Helvetica, sans=serif; font-size: 1em; font-weight: bold; text-transform: uppercase; color: #660066; text-decoration: none; text-indent: 0px; display: block; } #leftnav a:hover { font-family: Arial, Helvetica, sans-serif; font-size: 1em; font-weight: bold; text-transform: uppercase; color: #000033; text-decoration: none; text-indent: 0px; display: block; background-color: #CCCCCC; } body { background-color: #FFFFFF; } #maintext { background-color: #F7EED7; float: right; width: 500px; padding: 10px; } h1 { color: red } 
 <!doctype html> <head> <title>Cafe Townsend: Wine Tasting Terms </title> <link type="text/css" rel="stylesheet" href="cafe.css"> <meta charset="utf-8"> </head> <div id="leftnav"> <p><a href="index.html">Home</a></p> <p><a href="menu.html">Menu</a></p> <p><a href="location.html">Location</a></p> <p><a href="RestaurantInfomation.html">Restaurant Infomation</a></p> <p><a href="ResturantReview.html">Restaurant Review</a></p> <p><a href="specialevents.html">Special Events</a></p> <p><a href="dvd.html">DVD</a></p> <p> <a href="wine-list.html"> <img src="../images/wine_header.jpg" alt="Wine Ad" width="150" height="100" border="0" /></a> </p> </div> <p>Greeting: &quot;Hello, World!&quot;</p> <h1>Knowing your wines</h1> <dl> <dt>Acid, acidity</dt> <dd>The tart (or in excess, sour) quality that wine's natural acidity imparts and that gives the wine a sense of body and structure. Required for proper balance; too much or too little constitutes a flaw.</dd> <dt>Almond</dt> <dd>A light bitter, nutlike quality sometimes noted in Italian white wines.</dd> <dt>Anise</dt> <dd>Faint licorice, a pleasant element in some Spanish reds; may indicate, however, that the wine has been artificially acidified, a practice that may improve short-term enjoyment but tends to make wines that cellar poorly.</dd> <dt>Attack</dt> <dd>A technical term for the first impression the wine makes as it reaches your palate, distinguished (in time sequence) from &quot;middle&quot; or &quot;"mid-palate"&quot; and &quot;finish&quot; or &quot;aftertaste.&quot;</dd> <dt>Bouquet, bottle bouquet</dt> <dd>As a technical term, the smells that develop with age in the wine bottle, as opposed to &quot;aroma,&quot; the smells associated with the fruit. I have little use for distinctions this narrow and try to avoid using them in my wine notes.</dd> <dt>Earthy</dt> </dd>Generic term for a range of aromas and flavors associated with organic qualities like &quot;barnyard,&quot; &quot;forest floor,&quot; &quot;merde,&quot; and &quot;tree bark.&quot; May be associated with brettanomyces (see above) but can also result from oak aging or the nature of specific grapes. Mourvedre, for instance, imparts a characteristic earthy aroma. Again, not necessarily a fault, but &quot;earthy&quot; wines tend to be controversial, and a little bit is usually enough.</dd> </dl> </body> </html> 

So for some reason my html is not getting the dt and dd and changing the colors from normal to red. 因此由于某种原因,我的html无法获取dt和dd并将颜色从正常更改为红色。 I dont get it, it goes to file (it should) but is doing nothing. 我不明白,它已归档(应该),但什么也没做。 have tried checking file names, making sure the paths are correct (they are). 尝试检查文件名,确保路径正确(正确)。 They are in the same exact folder. 它们在相同的文件夹中。

这是因为您尝试使用的颜色不是有效的值(dark red (#6b1101)不正确。请在此处查找可用的值类型https://www.w3schools.com/cssref/pr_text_color.asp

Take out the weight: bold; 取出重量:粗体; This is breaking the CSS below. 这打破了下面的CSS。 It should be font-weight:bold. 它应该是font-weight:bold。

font-dd {font: Arial, Helvectica, sans-serif;
size: .9em;
font-weight: bold;
color:red;
line-height: 2em; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM