到目前爲止,我的身體標記中的第一個元素(無論是img還是h1)一直存在問題,只是簡單地停留在頁面的左上角(我認爲body標籤開始的地方),不管邊距大小還是元素寬度,都無法以任何方式移動它。我甚至試着給它添加一個背景顏色,看看它是否可以工作,而不是,所以我猜想由於某些原因,不能對這個元素進行修改。身體標記中的第一個元素被困在左上角
這裏是我的HTML
<body>
<header class="Top">
<img src="img/logo.png" alt="NeoDance Logo" width="356" height="48" class="logo">
<nav class="NavBar">
<a href="" class="links">Home</a>
<a href="" class="links">About</a>
<a href="" class="links">Class schedules</a>
<a href="" class="links">Performances</a>
<a href="" class="links">Blog</a>
<a href="" class="links">Contact</a>
</nav>
<div class="ClearFix"></div>
</header>
這裏是我的CSS。需要注意的是在此之前顯示的行,我使用的CSS邁耶一個完全未經編輯的版本重新
header.Top{
width: 1440px;
margin: auto;
background-color: #303030;
overflow: hidden
}
div.wrapper
img.Logo{
margin-top: 35px;
margin-bottom: 35px;
margin-left: 250px;
margin: auto;
background-color: #303030;
}
nav.NavBar{
float: right;
width: 490px;
background-color: #303030;
list-style: none;
margin: auto;
margin-right: 250px
}
a.links{
float: right;
font-size: 15pt;
font-family: 'Muli', sans-serif;
color: #8c8c8c;
margin-top: 50px;
margin-right: 18px;
}
div.container 1{
width: 490px;
clear: both
}
img.dancers{
float: right;
}
div.ClearFix{
clear: both;
}
這應該已經應用img.logo利潤率,如在CSS中指定。但是它只是卡在那裏,顯示下面的圖片
謝謝,我沒有注意到我使用Logo而不是徽標。包裝的東西在那裏,因爲我沒有把任何信息,但我會用它。無論如何,你的建議幫助我解決了這個問題,謝謝! – Dasphillipbrau
沒問題。你會介意投票我的答案,因爲它對你有幫助嗎? –
我投了你的答案,但由於我是新成員,投票不顯示 – Dasphillipbrau