2017-02-21 1 views
-1

Also mache ich diese Seite, wo ich ein Problem habe. Wie Sie sehen können, ist es ein bisschen komisch. Ich möchte, dass die Nummer 2 in der nächsten Zeile steht, aber ich weiß nicht wie.Ich muss mein P-Tag bekommen, um eine neue Zeile zu bekommen, wer weiß es?

Es scheint wie, wenn ich in den <br> Tag, alles geht unter, aber wenn ich nicht das <br> Tag habe, funktioniert es. Bitte helfen Sie.

body{ 
 
    margin: 0; 
 
    padding: 0; 
 
    font-family: 'Verdana', sherif; 
 
} 
 

 
.nav{ 
 
    background-color: #ffffff; 
 
    color: #000000; 
 
    list-style: none; 
 
    text-align: center; 
 
    padding: 20px 0 20px 0; 
 
    border-top: solid 2px #f0f0f0; 
 
    border-bottom: solid 2px #f0f0f0; 
 
    margin: 0px; 
 
} 
 

 
.nav > li{ 
 
    display: inline-block; 
 
    padding: 0 25px 0 25px; 
 
} 
 

 
.nav >li >a{ 
 
    text-decoration: none; 
 
    color: black; 
 
} 
 

 
.nav >li > a:hover{ 
 
    color: grey; 
 
} 
 

 
.button { 
 
    background-color: black; 
 
    color: white; 
 
    border: 1px solid #d9d9d9; 
 
    border-radius: 1px; 
 
    padding: 10px; 
 
} 
 

 
.button:hover { 
 
    background-color: orange; 
 
    color: black; 
 
} 
 

 
.text { 
 
    color: black; 
 
    text-decoration: none; 
 
}
<html> 
 

 
    <head> 
 
    <meta charset="utf-8"> 
 
    <title>Appetitten Pizza & Grill | Pizza</title> 
 
    <link rel="stylesheet" href="css2.css"> 
 
    </head> 
 

 
    <body> 
 

 
    <center> 
 

 
     <div style="width:70%"> 
 

 
     <div style="float:center; margin-bottom:0px"> 
 
      <a href="forside.html"><img src="something-logo.png"></a> 
 
     </div> 
 

 
     <div style="margin-top:0px"> 
 
      <ul class="nav" style="margin-bottom:0px"> 
 
      <li><a href="pizza.html"><font size="5">Some thing</font></a></li> 
 
      <li><a href="hamburger.html"><font size="5">Some thing</font></a></li> 
 
      <li><a href="kebab.html"><font size="5">Some thing</font></a></li> 
 
      <li><a href="salater.html"><font size="5">Some thing</font></a></li> 
 
      <li><a href="om-oss.html"><font size="5">Some thing</font></a></li> 
 
      </ul> 
 
     </div> 
 

 
     <div style="width:70%;float:center"> 
 

 
      <div style="width:100%; float:center"> 
 
      <div style="float:center; width:100%"> 
 
       <div style="float:left; width:10%"> 
 
       <p><strong>Nr:</strong></p> 
 
       </div> 
 
       <div style="float:left; width:75%"> 
 
       <p align="left"><strong>Some thing:</strong></p> 
 
       </div> 
 
       <div style="float:left; width:15%"> 
 
       <p><strong>Price:</strong></p> 
 
       </div> 
 
      </div> 
 
      </div> 
 

 
      <div style="width:100%; float:center"> 
 
      <div style="float:center; width:100%"> 
 
       <div style="float:left; width:10%"> 
 
       <p>1.</p> 
 
       </div> 
 
       <div style="float:left; width:75%"> 
 
       <p align="left"><strong>Thing:</strong><br>(here is going to be some ingrediants)</p> 
 
       </div> 
 
       <div style="float:left; width:15%"> 
 
       <p>10 $</p> 
 
       </div> 
 
      </div> 
 
      </div> 
 
      
 
      <div style="width:100%; float:center"> 
 
      <div style="float:center; width:100%"> 
 
       <div style="float:left; width:10%"> 
 
       <p>2.</p> 
 
       </div> 
 
       <div style="float:left; width:75%"> 
 
       <p align="left"><strong>Thing:</strong><br>(here is going to be some ingrediants)</p> 
 
       </div> 
 
       <div style="float:left; width:15%"> 
 
       <p>10 $</p> 
 
       </div> 
 
      </div> 
 
      </div> 
 
     </div>

Antwort

0

dieses div-Tag fügen Sie einfach über Ihre <p> Tag

<div class="NL"></div> 

und diese CSS-Zeile in der CSS-Datei

.NL 
{ 
clear:both; 
} 
Verwandte Themen