Jump to content
pstein

How to force <img> to be placed in next/new line?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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;

}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...