Nursultan Bagidolla
Nursultan Bagidolla

Reputation: 501

Add horizontal scroll bar when screen size is less than 768px

I'm using Bootstrap for responsive design. But I want to use it for minimum 768px (col-sm-*) width.

I have a bunch of elements with .col-* classes, the problem is that when I resize the window to less than 768px, the whole design breaks down.

How to limit the website's width 768px, and show horizontal scrollbar on smaller window sizes?

For example, I use this dummy method, but of course, it doesn't help:

@media screen and (min-width: 0) and (max-width: 768px) {
   ...
}

Upvotes: 0

Views: 4065

Answers (2)

Mike
Mike

Reputation: 97

If you want to display the scrollbar try to add this in your css @media screen and (min-width: 0) and (max-width: 991px) { overflow-x : scroll; }

Upvotes: 0

Irshad Khan
Irshad Khan

Reputation: 6046

It will display a scrollbar, if width parameter is true.

@media screen and (min-width: 0) and (max-width: 991px) {
   overflow: auto;
}

Upvotes: 1

Related Questions