I have been developing a bootstrap website and I have found 1 very major flaw, it treats tablet size the same as phone size, the col-xs-x (for 768px and under) applies to iphone and ipad alike.
http://www.think.darkstarmedia.net/
With my design I use 2 columns for desktop and tablet size, once in the phone size I want it to be 1 column but bootstrap has no way to do that
I know I could create 2 copies of the exact same content and use media queries (e.g. display:none, display:block) and swap them out for under 480 pixels, but that seems like it goes against the whole point of using something like bootstrap..
Is there anyway to use bootstrap's columns to accomplish what I want..
e.g.
col-sm-3 for desktop (4 columns)
col-xs-6 for tablets (2 columns)
col-???-12 for phone (1 columns)
Or please clarify if I am missing the obvious
In rare cases where the column content forces the width (for example columns that contain fixed width images or non-wrapping text), use min-width:0 to force equal column width regardless of their content.
Bootstrap Grid - Small Devices Tip: Small devices are defined as having a screen width from 768 pixels to 991 pixels. For small devices we will use the . col-sm-* classes. Now Bootstrap is going to say "at the small size, look for classes with -sm- in them and use those".
Go to the Customize menu on Bootstrap website and choose your preferred size. In Less Variables -> Grid system you can find a form to input your preferred sizes. Then you can easily download the preferred grid. Hope this will help.
Auto Layout Columns In Bootstrap 4, there is an easy way to create equal width columns for all devices: just remove the number from . col-lg-* and only use the . col-lg class on a specified number of col elements. Bootstrap will recognize how many columns there are, and each column will get the same width.
According to their documentation on the Grid Options you should be using the 'xs' classes for phones, 'sm' for tablets, and 'md' classes for desktop.
The solution was to add more media queries and extra styles
/* Extra Small Devices, Phones */
@media only screen and (max-width : 480px){
.callout-wrap, .vertical_photo {
margin-top:10px;}
.banner-left, .banner-right, .content-left-side, .content-right-side{
width:100%;
}
.border_drop_bg {
margin-top:10px;
width:100%;}
.vertical_photo {
display:none;}
}
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