我无法对齐登录并在右侧创建新帐户标签

时间:2017-01-22 10:56:14

标签: html css

<!DOCTYPE html>

   <html>
   <link rel="stylesheet" href="..\\new\font-awesome.css">
  <head>

CSS:

请告诉我关于字体真棒,如何使用fa 我使用fa但它没有在输出中显示

 <style>
   body {margin:0;}

 ul {
  list-style-type: none;
margin: 0;
padding: 2;
overflow: ;
background-color: #334;
position: fixed;
top: 0;
width: 100%;
}

 li {
float: left;
}

li a {
display: block;
color: white;
text-align: right;
padding: 14px 16px;
text-decoration: none;
}

 li a:hover:not(.active) {
background-color: #7ac5cd;
}

.active {
background-color: #4CAF50;
}
    }
#nav li {
    float: right;
    padding: 15px;
    }
#nav li:hover {
    background: teal;
    }
    h1 {
color: black;
font-size: 4em;  
}

.container {right: 0; text-align: center;}

  .container .left, .container .center, .container .right { display:                inline-block; }

   .container .left { float: left; }
 .container .center { margin: 0 auto; }
 .container .right { float: right; }
.clear { clear: both; }

 .l1 {
text-align: right !important;
 color: #5ACFC9;
 }
 </style>

HTML:        

  <font size = "8"><font color = "#98F5FF">SPORTS CLUB</font></font><br> <hr     width = 80% align="left">
 <li >
<li><a href=""><font size="5"font color = "white">Home         </font>     </a></li>
<li><a href=""><font size="5"font color = "white">Gallary      </font></a></li>
<li><a href=""><font size="5"font color = "white">About Us     </font></a></li>
 <li><a href=""><font size="5"font color = "white">Contact Us   </font></a></li>

如何对齐这两个标签

我想在右侧移动这些

          <li class="l1"><a href="..\\new\login.html""><font size="5"font color = "white">Log In</font></a></li>
     <li><a href="..\\new\html.html"><font size="5"font color = "white">Create new Account</font></a></li>
</ul>

</head>
<body>
       <div style="padding:20px;
       margin-top:30px;
      background-color:#1abc9c;
     height:1500px;">
    <br><br><br><BR><BR>
  <i class="fa fa-car fa-lg"></i>
 <h1>Fixed Top Navigation Bar</h1>
  <h2>Scroll this page to see the effect</h2>
  <h2>The navigation bar will stay at the top of the page while  scrolling</h2>

    <div class="right">
    <div align="right"class="fa fa-phone"></div></div>

    <p>Some text some text some text some text..</p>
  <p>Some text some text some text some text..</p>
   <p>Some text some text some text some text..</p>
<p>Some text some text some text some text..</p>
<p>Some text some text some text some text..</p>
<p>Some text some text some text some text..</p>
<p>Some text some text some text some text..</p>
</div>

 </body>
 </html>

如何解决问题

1 个答案:

答案 0 :(得分:0)

您可能想要移动UL元素。它属于body标签,而不是head标签。

相关问题