div rechts ausrichten in Bootstrap 3
Gibt es eine Möglichkeit in Bootstrap 3, um ein div rechts ausrichten?
Ich bin mir der Offset-Möglichkeiten bewusst, aber ich möchte ein formatiertes Div rechts von seinem Container ausrichten, während es in einer mobilen Ansicht mit voller Breite zentriert sein sollte. Die Klasse 'pull-right' funktioniert nicht mehr. Haben sie vergessen, es zu ersetzen, oder übersehe ich etwas offensichtlich?
<div class="row">
<div class="container">
<div class="col-md-4">
left content
</div>
<div class="col-md-4 col-md-offset-4">
<!-- The next div has a background color and its own paddings and should be aligned right-->
<!-- It is now in the right column but aligned left in that column -->
<div class="yellow_background">right content</div>
</div>
</div>
</div>
Sicher weiß ich, wie man das in CSS macht, aber kann man das auch in Bootstrap 3 machen?
45
3
Die Klasse pull-right ist in Bootstrap 3 noch vorhanden Siehe die 'Hilfsklassen' hier
pull-right ist definiert durch
ohne weitere Informationen über Stile und Inhalte ist es schwer zu sagen.
Es zieht definitiv rechts in diesem JSBIN wenn die Seite breiter als 990px ist - das ist, wenn die col-md Styling tritt in, Bootstrap 3 wird mobile erste und alle.
Meinen Sie so etwas wie dies:
HTML
CSS
Ein vollständiges Beispiel finden Sie auf Codepen.
ich denke, du versuchst, den Inhalt innerhalb des div nach rechts auszurichten, das div mit Offset schiebt sich bereits nach rechts, hier etwas Code und LIVE-Beispiel:
FYI:
.pull-right
schiebt nur das div nach rechts, aber nicht den Inhalt innerhalb des div.HTML:
CSS:
Eine weitere Änderung:
Ich hoffe, dass sie Ihr Problem lösen wird