HTML fixed and full column pattern

Today, 27th January 2023, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities. We are uniting against Putin’s invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.

Often you need to make one column fixed and another should take rest of space.

fixed and full column in table

One of way how to do this without table layout and without calc(100%-xx):

<div class="container">
    <div class="left">left</div>
    <div class="right">right</div>


.container {
    width: 100%;

.left {
    width: 100px;
    margin-right:  -100px;

.right {
#html #css
Ivan Borshchov profile picture
Apr 23, 2017
by Ivan Borshchov
Did it help you?
Yes !

Best related