0
解決 由於馬立克,居中CSS/HTML主要格
我認爲那些被改變,因爲她與它發揮各地,我已經然而,在記事本中打開文件後++注意到顏色是關閉。不知怎的,3的雙引號是斜體,這導致HTML忽略主。問題解決了。我會指導她回答您的代碼清理問題。
再次感謝!
我的女朋友在做她的html作業,並且遇到了一個以她爲主的div的問題。
請原諒我犯的錯誤,因爲我不知道HTML。我正在學習C++,這不是非常有用。然而耐心地調試和研究一個答案並不能解決問題,特別是在給出的例子使用相同的代碼時。
我建議堆棧溢出,因爲這個網站在過去幫助過我。儘管這個問題看起來像重複,但所提供的答案都沒有解決問題,我相信解決方案是初學者認爲與問題無關的問題,儘管我無法證實。
CSS樣式:
body {
background-image: url(../images/bg.gif);
margin: 0 ;
font: 11px "Trebuchet MS", Verdana, Arial, sans-serif;
color: #7C3404;
line-height: 18px;
text-align: center;
}
#main {
background-color: #FFFFFF;
border-left: 2px solid #000;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
width: 700px;
margin: 0 auto;
text-align: left;
position: absolute;
}
h1 {
font: 14px 「Georgia」, Times, serif;
font-weight: bold;
color: #7C3404;
padding: 0px 25px 0px 25px;
width: 700px;
margin: 0 auto;
}
p {
padding: 0px 25px 0px 25px;
}
ul {
margin-left: 40px;
padding-right: 60px;
list-style: url(../images/bullet.gif);
width: 700px;
margin: 0 auto;
}
a {
font-weight: bold;
color: #AD3110;
text-decoration: none;
}
a:hover {
font-weight: bold;
color: #6B0808;
text-decoration: underline overline;
}
HTML指數:
<!DOCTYPE html>
<html>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<title>Chelsea Palmer + Exercise 2</title>
</head>
<body>
<div id=「main」>
<img src="images/header.jpg" alt=「Flying solo」 height="250" width=「850" />
<h1> That’s Right, it’s time to fly solo! </h1>
<p> So now it’s your turn to show us what you’re made of! So what do you need to do to show us that you can fly on your own? Here are the criteria for this exercise: </p>
<ul>
<li> Apply the background image so it repeats, no matter how large the browser is! </li>
<li> Set up the layout as similar to what you see in this screenshot </li>
<li> The heading should be implemented with h1 tag. Assign the following properties and values: font-size 14px, Georgia, bold, color #7C3404. </li>
<li> The body copy should be 11px, Trebuchet MS or sans-serif, color #7C3404. Also the line height should be 18px.</li>
<li> Maintain site organization (that means create folders for images, css) </li>
<li> Use proper naming conventions (no spaces, crazy characters, all lowercase) </li>
<li> The html page should be named index.html </li>
<li> Include doctype and four main tags </li>
<li> Use external CSS file to apply style to your document. Style the links so that they are bold and they have a border above and below when they are hovered. </li>
<li> Apply a custom bullet to this unordered list. </li>
<li> Create external links for the three links below that will open in a new browser window. </li>
</ul>
<h1> Notable sites to see! </h1>
<p>
Here are a few notable sites to check out in your spare time to get inspired and learn more about html & css
</p>
<ul>
<li> <a href="http://www.cameronmoll.com" target="_blank">http://www.cameronmoll.com</a> - Learn from Captain America, Cameron Moll. </li>
<li> <a href="http://www.cssbeauty.com" target="_blank">http://www.cssbeauty.com</a> - Get inspired and learn tricks of the trade </li>
<li> <a href="http://www.stylegala.com" target="_blank">http://www.stylegala.com</a> - Keep up to date and inspired at stylegala </li>
</ul>
</div>
</body>
</html>
另外,文本對齊:左是多餘的,因爲它是默認選項我猜 –