Adjust horizontal and vertical orientation in Bootstrap

2

My page is horizontal the way I want it:

But if you leave the phone upright it's going like this:

How do you make it vertical in the following way?

Follow my code:

   <div class="row">
        <div class="col-xs-4 col-sm-4 col-md-4">
            <a href="#">
                <img src="~/Content/Images/btnHome.png" />
            </a>
        </div>
        <div class="col-xs-4 col-sm-4 col-md-4">
            <a href="#">
                <img src="~/Content/Images/btnProduto.png" />
            </a>
        </div>
        <div class="col-xs-4 col-sm-4 col-md-4">
            <a href="#">
                <img src="~/Content/Images/btnContato.png" />
            </a>
        </div>
    </div>
    
asked by anonymous 08.09.2014 / 18:02

2 answers

3

You do not need to crank in css, just remove the col-xs-4 class that refers to "Extra Small Devices", so the divs are in rows and not in columns on devices that are smaller than 768px. Here goes the edited code:

   <div class="row">
    <div class="col-sm-4 col-md-4">
        <a href="#">
            <img src="~/Content/Images/btnHome.png" />
        </a>
    </div>
    <div class="col-sm-4 col-md-4">
        <a href="#">
            <img src="~/Content/Images/btnProduto.png" />
        </a>
    </div>
    <div class="col-sm-4 col-md-4">
        <a href="#">
            <img src="~/Content/Images/btnContato.png" />
        </a>
    </div>
</div>
    
23.09.2014 / 15:58
-2

Put float:left in the last two divs .

    
08.09.2014 / 19:02