Home › Forums › CSS › Width fixed div element same as the parent's › Reply To: Width fixed div element same as the parent's
September 13, 2016 at 8:19 am
#245516
Paulie_D
Member
I think I’ve cracked this.
You have a handy max-width
in play.
We can use that in our styles for .right
using calc
and then your width:inherit
will work…I think…if we include the max-width:inherit
.right {
position: relative;
float: left;
width: 25%;
max-width: calc(50rem / 4)
}
I think we get what you are after.