2016-10-15 178 views
0

我已經創造了我的CSE功課網頁...我想有一個導航欄,在早期的網站......相反,我得到這個nav bar below the borderline where it supposed to be.在一個div水平導航欄

下面的代碼`

<body style="background: linear-gradient(#c3c3e5, #f1f0ff);"> 
<style> 

#title { 
    font-family:courier; 
    font-size:40px; 
    text-align:center; 
    text-transform:uppercase; 
    border:2px solid black; 
    border-radius:30px; 
    background-color:#443266; 
} 

#Welcome { 
    font-family:courier; 
    font-size:30px; 
    text-align:center; 
    text-decoration:underline; 
    text-decoration: bold; 
} 

#q { 
    font-family:courier; 
    font-size:25px; 
    text-align:justify; 
    text-decoration:none; 
} 

ul { 
    list-style-type:none; 
    margin:0; 
    padding:0; 
} 

li { 
    float:right; 
} 

li a { 
    display:inline-block; 

    text-decoration:none; 
    background-color:black; 
    color:white; 
} 

#audio { 
    float:right; 
    display:inline-block; 
    background-color:lightblue; 
} 

</style> 

    <div id="title"> 
    <p>Star Travel</p> 

    <audio controls autoplay loop id="audio"> 
     <source src="../assets/audio/13_Fairy Law.mp3" type="audio/mpeg"> 
    </audio> 
    <br> 
    <br> 

    <ul> 
     <li><a href="about.html">About</a></li> 
     <li><a href="user-rev.html">Review</a></li> 
     <li><a href="trip-accom.html">Accomodation</a></li> 
     <li><a href="site-trip.html">Trip</a></li> 
     <li><a href="main.html">Home</a></li> 
    </ul> 
    </div> 

`

請幫我 在此先感謝

+0

不是那麼明白..什麼是您當前的外表和你預計的外觀? – Kasnady

+0

你喜歡把菜單放在哪裏? 'STAR TRAVEL' div裏面? –

+0

您在網站的早期階段意味着什麼?在頂部,在星空旅行的紫色框上方? –

回答

0

我覺得這是什麼ü試圖做

body{ 
 
    background: linear-gradient(#c3c3e5, #f1f0ff); 
 
    margin: 0; 
 
} 
 
#title { 
 
    font-family:courier; 
 
    text-align:center; 
 
    text-transform:uppercase; 
 
    border:2px solid black; 
 
    border-radius:30px; 
 
    background-color:#443266; 
 
} 
 
p{ 
 
    font-size:40px; 
 
} 
 

 
#Welcome { 
 
    font-family:courier; 
 
    font-size:30px; 
 
    text-align:center; 
 
    text-decoration: bold; 
 
} 
 

 
#q { 
 
    font-family:courier; 
 
    font-size:25px; 
 
    text-align:justify; 
 
    text-decoration:none; 
 
} 
 

 
ul { 
 
    list-style-type:none; 
 
    margin:0; 
 
    display: inline-block; 
 
    width: 100%; 
 
    background-color: #111; 
 
    padding: 10px 0; 
 
} 
 

 
li { 
 
    float:left; 
 
    padding: 0 10px; 
 
} 
 

 
li a { 
 
    text-decoration:none; 
 
    color:white; 
 
} 
 

 
#audio { 
 
    float:right; 
 
    display:inline-block; 
 
    background-color:lightblue; 
 
}
<div id="title"> 
 

 
    <ul> 
 
     <li><a href="about.html">About</a></li> 
 
     <li><a href="user-rev.html">Review</a></li> 
 
     <li><a href="trip-accom.html">Accomodation</a></li> 
 
     <li><a href="site-trip.html">Trip</a></li> 
 
     <li><a href="main.html">Home</a></li> 
 
    </ul> 
 

 
    <p>Star Travel</p> 
 

 
    <audio controls autoplay loop id="audio"> 
 
     <source src="../assets/audio/13_Fairy Law.mp3" type="audio/mpeg"> 
 
    </audio> 
 
    <br> 
 
    <br> 
 

 
    
 
    </div>

+0

非常感謝!你幫了我 –