2017-10-08 3 views
1

Kann mir jemand erklären, wie man button mit dem Texttitel mit Bootstrap 4 beta ausrichten, bin ich sicher, dass dies example nicht funktioniert, weil pull-left geändert wird.Ausrichten Knopf mit dem Text Titel bootstrap 4 beta

Ich benutze float-left wenn ich versuchte, sie auszurichten, aber die Schaltfläche ist nicht genau wo es sein sollte, so sollte der Titel auf der linken Seite sein und rechts in der gleichen Zeile, hier ist meine JSFIDDLE, so kann jemand erklärt mir, wer das mit der neuen bootstrap 4 beta erreicht.

<div class="row justify-content-center"> 
    <div class="col-6"> 
     <h5><strong>BLOG TITLE GOES HERE</strong></h5> 
     <div class="float-right"> 
     <button type="button" class="btn btn-outline-secondary">Read more</button> 
     </div> 
     <p class="blockquote-footer text-primary">By Branko Milosevic</p> 
     <p>22.08.2017</p> 
     Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 
    </div> 
    </div> 
+0

I zur Verfügung gestellt haben ** jsfiddle ** Beispiel: P – PetarP

+0

Hier leid, und ** ** jsfiddle ist in Ordnung. – PetarP

Antwort

1
<div class="row justify-content-center"> 
    <div class="col-6"> 
     <div class="foo"> 
      <h5><strong>BLOG TITLE GOES HERE</strong></h5> 
      <div class="float-right"> 
       <button type="button" class="btn btn-outline-secondary">Secondary</button> 
      </div> 
     </div> 
     <p class="blockquote-footer text-primary">By Petar Pilipovic</p> 
     <p>22.08.2017</p> 
     Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 
    </div> 
</div> 

<style> 
.foo { display: flex; justify-content: space-between; } 
</style> 

https://jsfiddle.net/a6frvp9d/1/

+0

statt '.foo' können Sie die eingebauten Klassen verwenden:' d-flex justify-content-between'. https://jsfiddle.net/a6frvp9d/4/ Siehe: https://v4-alpha.getbootstrap.com/utilities/flexbox/ –

+0

@ G-Cyr Ich habe nie Twitter Bootstrap verwendet, nicht vertraut mit seinen eingebauten Klassen) –

Verwandte Themen