Reputation: 53
Recently I realized there was a huge error with the display in my website and it does not work for all devices. I always thought using percentages as a way to represent width and height was a good idea until I realized it can mess up the way a div is intended to look. So I have became aware of min-width
and max-width
as a way to fix this. However, after having said this, I have a new problem.
Here is an example of how my layout looks. The only problem is, the bigger my page gets, the more room in between the left and right divs there are. I am trying to make it to where my left column fills in that extra space. Here is my code
#container {
min-width: 960px;
}
#right {
width: 300px;
display: inline-block;
float: right;
}
#left {
min-width: 640px;
margin-right: 20px;
float: left;
display: inline-block;
}
As you can see, I gave it a min-width
of 960 because I read on previous questions that's the default amount that should be given. But for my left column I have only gave it a min-width, and I do not know what to set the width to in order to make it automatically fill in that space as much as possible without pushing my other div out of the way.
Upvotes: 0
Views: 77
Reputation: 3162
Please add max-width:100% important
on #container
remove those marked properties http://prntscr.com/6ek8uf
Upvotes: 2