2014-01-11 212 views
1
<head> 
<title>WCK&TMB</title> 
<style> 

* { 
    margin: 0px; 
    padding: 0px; 
} 

html, body { 
    width: 100%; 
    background-color: #FFC18F; 
} 

div#container { 
    width: 100%; 
    min-width: 1024px; 
} 

header { 
    height: 100px; 
    width: 100%; 
    background-color: #ff8400; 

    text-align: center; 
} 

header img { 
    clear: left; 
    float: left; 
    margin: 10px; 
} 

header a#purchase { 
    background: url("http://i.imgur.com/RJe8a1D.png") repeat-x; 

    width: 500px; 
    height: 25px; 
    margin: 30px; 
    padding: 5px; 

    border: 3px double #ccc; 
    text-align: center; 

    float: right; 

    font-family: Arial; 
    font-size: 20px; 
    text-decoration: none; 
    color: #ffffff; 
} 

section#main { 
    padding: 0px 0px 10px 0px; 
    text-align: center; 
} 

section#main div#head_announcements { 
    padding-top: 10px; 

    color: #000; 
    font-family: "Arial"; 
} 

section#main div#head_announcements h2 { 
    font-size: 24px; 
    font-weight: lighter; 
    line-height: 26px; 
} 

section#main h2 a { 
    color: #FFFFFF; 
    text-decoration: none; 
} 

section#main h2 a:hover { 
    color: #000000; 
} 

section#main nav { 
    background: url("./images/navBG.png") repeat-x; 
    width: 100%; 
    height: 35px; 
    text-align: center; 
} 

section#main nav a.link { 
    font-family: "Century Gothic"; 
    text-decoration: none; 
    color: white; 
    font-size: 25px; 
    vertical-align: top; 
    float:center; 
} 

section#main nav a.link:nth-of-type(1) { 
    float:center; 
} 

section#main nav a.link:hover { 
    color: #39F; 
} 

section#main nav a.link.active { 
    color: #39F; 
} 


section#main section#frames { 
    margin-top: 10px; 
    width: 100%; 
} 

section#main section#frames iframe { 
    border: 0px; 
    outline: 0px; 
    overflow: hidden; 

    margin: 0px; 
    padding: 0px; 
} 

section#main section#frames iframe#frame1 { 
    width: 650px; 
    height: 450px; 
    background-color: black; 
} 

section#main section#frames iframe#frame2 { 
    width: 350px; 
    height: 450px; 
} 

footer { 
    padding: 10px 0px 10px 0px; 
    width: 100%; 
    text-align: center; 
    height: 110px; 
} 
</style> 
</head> 

網址:http://skyaccess.se/forum/misc.php?page=hdppvsCSS導航欄中心

我似乎無法居中導航欄文本。有人可以糾正這個嗎?

此外,我試圖學習CSS,所以如果任何人都可以告訴我一個很棒的網站,我會非常感激。考慮到支付$ 29 /月是一些有積分的互動網站。

+0

請張貼您的'html'代碼。這裏是[** link **](http://www.w3schools.com/html/),讓您開始使用HTML,CSS,JavaScript等更多與網頁開發相關的內容。 –

回答

0

加浮動:留在你的CSS:

section#main nav { 
background: url("./images/navBG.png") repeat-x; 
width: 100%; 
height: 35px; 
text-align: center; 
float: left; 
0

也加入這個CSS用於創建導航之間目瞪口呆: 「填充右:40像素;」。

section#main nav a.link { 
font-family: "Century Gothic"; 
text-decoration: none; 
color: white; 
font-size: 25px; 
vertical-align: top; 
float: center; 
padding-right: 40px;