Javascript 导航栏和图像位于同一行

Javascript 导航栏和图像位于同一行,javascript,html,css,Javascript,Html,Css,所以我按图像对齐,但现在我想把对齐的图像放在导航栏的同一条线上。 CSS代码,导航栏部分: body { font-family: "Trebuchet MS", Verdana, sans-serif; font-size: 16px; background-color: lightblue; color: #696969; padding: 3px; } #main { padding: 5px; padding-left: 15

所以我按图像对齐,但现在我想把对齐的图像放在导航栏的同一条线上。 CSS代码,导航栏部分:

body {
    font-family: "Trebuchet MS", Verdana, sans-serif;
    font-size: 16px;
    background-color: lightblue; 
    color: #696969;
    padding: 3px;
}

#main {
    padding: 5px;
    padding-left:  15px;
    padding-right: 15px;
    background-color: #ffffff;
    border-radius: 0 0 5px 5px;
}

h1 {
    font-family: Georgia, serif;
    border-bottom: 3px solid #cc9900;
    color: #996600;
    font-size: 30px;
}

table {
    width:100%;
}

table, th , td {
    border: 1px solid grey;
    border-collapse: collapse;
    padding: 5px;
}

th {
    text-align: left; 
}

table tr:nth-child(odd) {
    background-color: #f1f1f1;
}
table tr:nth-child(even) {
    background-color: #ffffff;
}

ul#menu {
    padding: 0;
    margin-bottom: 11px;
}

ul#menu li {
    display: inline-block;
    margin-right: 2px;
}

ul#menu li a {
    background-color: orange;
    padding: 10px 40px;
    text-decoration: none;
    color: #ffffff;
    border-radius: 4px 4px 4px 4px;
}

ul#menu li a:hover {
    color: white;
    background-color: blue;
}

table {
    width:100%;
}

table, th , td {
    border: 1px solid grey;
    border-collapse: collapse;
    padding: 5px;
}

th {
    text-align: left; 
}

table tr:nth-child(odd) {
    background-color: #f1f1f1;
}
table tr:nth-child(even) {
    background-color: #ffffff;
}
HTML代码:

<!DOCTYPE html>
<html>

<head>
  <title>X-treme FreeRoam</title>
  <link href="site.css" rel="stylesheet">
</head>
<body>

<nav id="nav01"></nav><img src="images/title.png" width="386px" height="56px" align="right">

<div id="main">
  <center><div id=”header”><img src="images/MyBB Logo 3.png" style="width:970px;height:280px"></div></center>
  <h1><center><b>Welcome to X-treme FreeRoam's website</b></center></h1>

  <p><center>Welcome to X-treme FreeRoam's website, we setup a forum website for players from X-treme FreeRoam server in Grand Theft Auto San Andreas Multiplayer to communicate and voice their feedback and improvements for the server. This page is the homepage of our server. You can talk about other things unrelated to Grand Theft Auto on the Unrelated topic under the Other forum by clicking on the Forum tab in the navigation bar. Please do look around.</center></p>

</div>

<footer id="foot01"></footer>

<script src="script.js"></script>

</body>
</html>

极限自由漫游
欢迎访问X-treme FreeRoam的网站
欢迎访问X-treme FreeRoam的网站,我们为Grand Theft Auto San Andreas多人游戏中X-treme FreeRoam服务器的玩家建立了一个论坛网站,以交流和表达他们对服务器的反馈和改进。这个页面是我们服务器的主页。通过点击导航栏中的论坛选项卡,您可以在其他论坛下的无关主题上谈论与侠盗猎车手无关的其他事情。请一定要四处看看


注意,我的nav01和foot01来自我创建的同一个javascript

注意:
已被弃用,不应再使用。
float:left对于你的
#nav01
将帮助你@Paulie\u D你的意思是什么?@fcastillo我在哪里添加浮动:左;至
#nav01
标记。给你一个