如何將我的內容放在我的導航下?每當我在裏面放一些文字時,它就會落在綠色的背景之後,並被導航覆蓋。請請幫助我如何把我的文字導航 固定導航下的HTML內容
<html>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 10px;
overflow: hidden;
background-color: #1E9600;
\t position: fixed;
top: 0;
width: 100%;
\t height:75px;
}
li {
float: left;
\t height:75px;
\t border-right: 5px solid red;
}
li:last-child {
border-right: none;
}
li a {
display: block;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: yellow;
}
.active {
background-color: #4CAF50;
}
</style>e>
</style>
<head>
<title> E-Benta </title>
<ul>
<li><a href="Home.html"> <img src="logo.png"> </img> </a>
<li><a href ="Home.html">Home </a></li>
<li><a href ="Products.html">Products </a>
<li><a href ="about.html">About us </a>
<li><a href ="contact.html">Contact us </a>
</ul>
</head>
<spacer>testing </spacer>
</body>
</html>
感謝兄弟,無論如何,你應該考慮我應該把我的主頁上的內容? – theodore
對不起,我無法就您網頁上的內容提供建議,但我希望我的回答能幫助您解決您的問題=) –
它的工作原理,感謝您的幫助! – theodore