Need help with wrapping text around a 320px width image that is floated left? Here is the HTML code:
<div>
<img src="https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png" style="width:320px; float:left; margin:0 10px 4px 0;">
a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg a bb ccc ddd eeee fffff gggggg
</div>
Encountering an issue when the window size is between 321-400 pixels, causing the text to look weird. Looking for a solution to define a minimum width (to the right) of 100 pixels so that the text wraps down beside the image and then extends under it when the screen is wider.
The desired behavior:
- When the screen is 320px wide, image on top and text below.
- With a screen width of 370px, image remains on top with text below.
- For screens larger than 420px, image floats left and text wraps around to the right and beneath it.
Seeking a simple CSS solution without relying on complex JavaScript for screen resolution adjustments.
Thank you!
😊
Edit:
Here's a link to the fiddle.
Resize the window to see only the letters "a" and "bb" displayed on the right side.