pstein Posted June 3, 2020 Share Posted June 3, 2020 Occasionally I load a web page which contains a text line and immediately appended after the right side an image <img> I want to let the <img> start in a next line. So I need a kind of <br> separation between text and image (not with <P>). However I have no access to the original webserver but want to apply a modification afterwards (after loading) I can imagine that there is a CSS property (for <img>) which let me tell the browser engine "put in next line". How can I achieve this in detail? Peter Link to comment Share on other sites More sharing options...
dsonesuk Posted June 3, 2020 Share Posted June 3, 2020 img tag by default is inline, meaning it acts like text and directly follows any text before it, by making it a block element it will move to the next line. img { display: block; } Link to comment Share on other sites More sharing options...
pstein Posted June 4, 2020 Author Share Posted June 4, 2020 @dsonesuk: Thank you. It works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now