Follow the instruction at http://getbootstrap.com/components/#media, I copied the code:
<div class="container">
<div class="media">
<a class="media-left media-bottom" href="#">
<img src="https://www.gravatar.com/avatar/16250bf5bb2c9f970cdc0f43c830b34f?s=32&d=identicon&r=PG">
</a>
<div class="media-body">
<h4 class="media-heading">Bottom aligned media</h4>
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
<p>Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
</div>
</div>
</div>
at jsfiddle http://jsfiddle.net/x3a1c40h/3/
As we can see the img appears on the top of the text, but not on the left, why is that?
Thank you!
Just like the doc said
pull-left
and pull-right
deprecated for that use as of v3.3.0.
And the version of bootstrap you were using in the jsfiddle was 3.0.
Change the external source from
http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css
http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js
to
http://netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
http://netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
resolves the problem.
see the updated link http://jsfiddle.net/x3a1c40h/7/
Add pull-left to img
<div class="container">
<div class="media">
<a class="media-left media-bottom" href="#">
<img class="pull-left" src="https://www.gravatar.com/avatar/16250bf5bb2c9f970cdc0f43c830b34f?s=32&d=identicon&r=PG">
</a>
<div class="media-body">
<h4 class="media-heading">Bottom aligned media</h4>
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
<p>Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
</div>
</div>
</div>
The classes .pull-left and .pull-right also exist and were previously used as part of the media component, but are deprecated for that use as of v3.3.0. They are approximately equivalent to .media-left and .media-right, except that .media-right should be placed after the .media-body in the html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With