Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Floating div, semi-dynamic size? Reply To: Floating div, semi-dynamic size?

#148124
johnl
Participant

Hi sadunaresh, thanks for the quick reply. Well, that’s what I have now. The problem is that when the actual width of outer is smaller than the width specified for inner, then inner moves out of outer. I’ve added some borders and adjusted the width so you can see what I mean in the Codepen example. Just resize the browser window.

What do I want? I want the width of inner be 300px if and only if the width of outer is > 300px. Otherwise, the width of inner should adjust accordingly.