How to make a horizontal scroll when minifying window? I made overflow-x in body, but there is no horizontal scrolling and elements shifted - I need no shift. Link to html and css with images: https://drive.google.com/drive/folders/0ByQHLazSsLs-dF9TbzJUcWdSVms?usp=sharing
How to make a horizontal scroll when minifying window?
64 views Asked by Alexander Bolzhatov At
2
There are 2 answers
0
On
You may need to wrap the the elements in a div and then use a media query.
CSS3 has @media queries that will change the way your HTML behaves at certain screen sizes.
body {
width:95%;
height500px;
background-color: lightgreen;
}
div {
width: 100px;
background: lightblue;
}
@media screen and (max-width: 768px) {
body {
background-color: lightgreen;
}
div {
width: 800px;
background: lightblue;
overflow-x:scroll;
}
}
<div>
asdfas
</div>
Just set the width of the
body
tag and applyoverflow-x: scroll;
I hope this will work fine for you.