I need a centered grid that takes up half of the screen on sm
, md
, and lg
devices, and full screen on xs
devices. Here is the current layout:
<div class="container">
<div class="row">
<div class="col-sm-6 col-sm-offset-3" >
<a href="#" >
<img class="img-responsive pull-right" src="/images/logo.png">
</a>
</div>
</div>
</div>
This layout works fine on sm
and larger devices. However, when testing it on an xs
device (using Chrome simulator), the col-md-6
takes 100% width as expected but has a height of only 1px. This means the logo is visible, but the background of the col-sm-6
DIV is not visible. The issue seems to be with the pull-right
class on my logo, but I'm unsure how to resolve it.
What am I doing wrong here?
Is this layout suitable for having 100% width on mobiles and 50% (centered) on other screens?