More often than not, I encounter myself having 2 divs: one in the left side and one in the right side of my page. The one in the left side has fixed width and I want the one of the right side to fill the remaining width space. Researching and testing I came up with the best solution that works like a charm.
Here I will show you how to make div fill remaining width.
How to make div fill remaining width
Here I provide you 2 pieces of code: html and css. Both seem accomplish the task:
left divright div
By adding a left margin to the #right div same as the #left div width, it’s own contents is forced to shift this amount.