K
K
kaletvintsev2017-09-03 17:03:04
css
kaletvintsev, 2017-09-03 17:03:04

How to stretch a block to the entire available width between two floated blocks with a known width?

Good afternoon,
I have a problem, the destruction of which I can not find on the Internet.
There are 3 blocks:
The left and right blocks have a fixed width, the center class must stretch to full width.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2017-09-03
@AlexMaxTM

If the left and right have a fixed width, then make the central block margin-left and margin-right by this value and set width: 100%

N
Nikolay, 2017-09-03
@nickolyashka

https://codepen.io/Nickolyashka/pen/EvMyJJ

C
cssfish, 2017-09-03
@cssfish

the parser ate something from you after "there are 3 blocks".
but the search was bad - overflow:hidden gets between floats well, but this solution depends on the order of the blocks https://jsfiddle.net/9L0abuw8/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question