I'm facing an issue that I can't seem to resolve on my own, so if anyone has any advice or solutions, I would greatly appreciate it:
________________________________________________________________________________
| body |
| |
| ___________ _______________________________________________________________ |
| | | | ||
| | div B | | ||
| | | | ||
| |__________| | ||
| | div C ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| |_______________________________________________________________||
|_______________________________________________________________________________|
Here is the code I've been working with:
<body>
...
<div style="float: left;">...</div>
<div style="float: left;">...</div>
...
</body>
The problem arises when the text in div C
exceeds the width of div C
itself (as shown in the outline). This causes div C
to shift its position under div B
, taking up the entire width of the body
.
Is there a way to prevent div C
from changing its position without specifying specific size values?
Thank you!
P.S. I've attempted placing div B
and div C
inside a display:block
or display:inline-block
div, but haven't had any success.