Hi there. I'm a bit of a novice with HTML and having a slight problem. I'm wanting to left align an image with text next to it but when i do this the passage of text below ends up next to it as well (see image) please help!
On this page https://milesofmotion.co.uk/window-tint-law-in-the-uk.
https://ibb.co/MNPsFxF - Image of problem.
Yes. You use the align attribute in the IMG tag. That's basically the same as the CSS property float. Either way you do it text (and other inline content like other images) will be pushed aside as long as there's room for it beside the image. To stop that you need to "clear the float" as it's called if you use CSS.
You should really use CSS for the float too and not the align attribute, since that's very old school. But even if you keep align you can use CSS for the clear bit.
Best to put everything in your style sheet, but you can also do it inline. Either add the last line here to the rule for .body2...
I should have explained what clear does. It basically tells the element it's attached to to stay free of the float and go to the highest available position below it.
The way we did it with HTML before we had CSS was to insert a BR tag before the stuff we wanted to go free from the float and use the clear attribute with it.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)