css - How can I make Bootstrap display content properly on mobile devices? -
just experience, i'm trying re-create amazon.com bootstrap 3. i've gotten lot of down, 1 thing can't seem mobile display. how can keep image inline text, not stack text when screen goes portrait mobile display? i've got viewport set, i've tried responsive images, issue seems how text stacks. can disable that?
heres simple example of i've got:
<div class="container"> <div class="row"> <div class="col-xs-4"> <a href="#"><img src="image.jpg"></a> </div> <div class="col-xs-8"> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> </div> </div>
when open page iphone 6, text titles stack terrible (unless there short title).
thanks!
as far know whole idea of bootstrap adjust screen width , stack content when needed. had 12 products , want 4 wide on computer screens (12 / 4 = "col-md-3") , , 2 wide in mobile screens (12 / 2 = "col-xs-6") - added background color clarity:
<div class="container"> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div> <div class="col-xs-6 col-md-3" style="background-color:#e9eaed"> <a href="#"><img class="img-responsive" src="image.jpg"></a> <ul class="list-unstyled"> <li><h4>product title</h4></li> <li>price</li> <li>*review stars*</li> </ul> </div>
hope helps
Comments
Post a Comment