Divs are already block level elements. Your div.img isn’t doing anything a regular <div> wouldn’t. I’d try wrapping your text in <p>s, and scrapping those <br/>s. That’s likely the actual reason for your problem. Your image isn’t floating around another element, because there isn’t another element. It’s just naked text in the div.
As a side note, both rules are probably overspecific. Your files will be more manageable if you use eg. .left instead of img.left unless you are using different styles for left-floated images vs any other left-floated elements.
Last edited by phillipgessert; 04-30-2022 at 01:38 AM.
|