2017-04-18 6 views
0

Ich habe dieses Stück Code, der nicht in der Reihenfolge ist. Ich versuche, es in der Mitte der Seite erscheinen zu lassen, aber ich möchte zu einer Zeile in verticle bleiben. aktuelles Ergebnis ist wie folgt. Wie stelle ich Kontakte inline ein?CSS align für die Liste

enter image description here

<div class="col-md-12"> 
             <div> 
              <ul class="list-icons" style="text-align: center;margin-left:0;"> 
               <li><i class="fa fa-phone-square pr-10 text-default" style="font-size:15px"></i> +65 1234567</li> 
               <li><i class="fa fa-fax pr-10 text-default" style="font-size:15px"></i> +65 12345678</li> 
               <li "><i class="fa fa-envelope pr-10 text-default" style="font-size:15px"></i>[email protected]</li> 
              </ul> 
             </div> 
               <br> 
            </div> 

Antwort

1

hinzufügen text-align:center zum div mit Ihrem ul, dann die ultext-align:center-text-align: left und fügen display: inline-block

<script src="https://use.fontawesome.com/89d51f385b.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> 
 
<div class="col-md-12"> 
 
    <div style="text-align:center;"> 
 
    <ul class="list-icons" style="text-align: left;margin-left:0; display:inline-block; list-style-type: none;"> 
 
     <li><i class="fa fa-phone-square pr-10 text-default" style="font-size:15px"></i> +65 1234567</li> 
 
     <li><i class="fa fa-fax pr-10 text-default" style="font-size:15px"></i> +65 12345678</li> 
 
     <li><i class="fa fa-envelope pr-10 text-default " style="font-size:15px"></i>[email protected]</li> 
 
              </ul> 
 
             </div> 
 
               <br> 
 
            </div>

+0

dies ändern. das funktioniert. Danke –