I just want to do a study that deals with responsive web design. Do not consider this issue as a problem that needs to be resolved. This is just an experiment :)
Sometimes we need to combine percentages and fixed values ββto calculate sizes, especially when it comes to creating some flexible layouts. As far as I know, I found four ways to achieve the desired effect in pure CSS.
Problem
Let's take a quick look at the problem - we need to create a three-column layout that spans the entire width of the page, where one of the columns has a constant width, and each remaining column fills half of the available space.
<main> <section> <article class="first"> I fill out half of the available space! </article> <article class="second"> I fill out half of the available space! <strong>Be aware that contents of article and aside may be changed!</strong> </article> <aside> I'm 50px width! </aside> </section> </main>
We need to perform the following layout without changing the structure of HTML, the contents of <article> and <aside> can be changed . Only pure CSS decisions will be made.

Solution 1 - fixed layout table for browser
The width of each column in the table is automatically calculated by default and depends on the contents of the cells. To solve the problem, we need to force the size of the column, so this solution uses a table with the table-layout property set to fixed . It allows you to set the width of any column.
This is probably the most supported solution ( read on ).
Solution 2 - Using calc ()
The calc () function allows you to combine percentage and fixed values, for example:
article { width: calc(100% - 50px); }
Unfortunately, this is not a cross-browser solution ( read more ), and it is recommended to use backups ( read more ).
Solution 3 - flexible flexbox
This is probably the future of responsive web design. I completed the desired layout in an instant. Flexbox offers many cool features ( read on ).
You can read about compatibility here .
Solution 4 - Margin Manipulation and Absolute Positioning
This is another well-supported solution. The absolute position applies to the static aside element, section has the corresponding right edge, 50% width is added for both article elements.
Summary
This is a very common problem in a responsive world, and I'm very curious if there are any other ideas on how to resolve it in pure CSS. Any thoughts on this would be appreciated.
Footnotes
Try to reduce the preview area of ββthe script to the minimum width - in my opinion, good, decent tables still behave most predictably;)
Sincerely.