#main {
white-space: nowrap;
overflow: hidden;
}
#main div {
display: inline-block;
heighh: 200px;
width: 1000px;
border: solid black;
}
<div id="main">
<div id="first">
1
</div>
<div id="second">
2
</div id="third">
<div>
3
</div>
</div>
I am trying to do something in my css code. The code has 3 div objects, and the width of each one of them is 1000px. I want those 3 divs to be in the same line, so i wrote that to the father div:
white-space: nowrap;
overflow: hidden;
In each one of them I entered:
display: inline-block;
The thing is they all cut to the right, but I want them to be cut from both right and left equally. That means that if there is 10px overflow area, i want 5px to be cut to the right and 5px to the left. How can I do that?
Many thanks,