Home > Article > Web Front-end > How to set two floating child divs to display in one line when the sum of their widths is greater than the parent width? _html/css_WEB-ITnose
I want to set up two left-floating child divs under a parent div with a defined width and height. When the sum of their widths is greater than the parent width, they will generate scroll bars and not wrap. However, I tried several times but it didn’t work. It still wraps. Got it! I know that scroll bars can be created using relative positioning without floating. But dear masters, how should we solve this problem if it continues to float? Thank you
You are not logical. Why do you want the sum of the widths to be greater than the parent width... is it greater than the parent width? Without positioning, this cannot be achieved with floating!
That’s right. It’s because the floating sub-box inside was made by someone else. I’m working on the outer frame. I don’t understand when I encounter this problem...
The following is the implementation code. I don’t know what it is. Not what you want