My question is the same as this one: make a div fill up the remaining width
But I don't want to change the order of the divs.
In my specific case, I'd like to have:
div float: left; width: 100% - 500px; (i.e. this should take up all the remaining space)
div float: right; width: 250px;
div float: right; width: 250px;
I can make this work if I rearrange the order of the divs, but I don't want to do that because on mobile devices I'd like to make the width of all the divs 100% and the order should remain. Is there a way to do this? Is flexbox the only solution?