Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force a line break after each image in Safari Reader?

Tags:

html

safari

I was unable to activate Safari Reader in a local HTML file, so I cannot give you a running example but only describe my problem:

The markup of my blog posts is basically this:

<div class="post">
 <div class="post-header">Hello, World</div>
 <div class="post-body">
  <p>Look at this picture:</p>
  <p><img src="http://37prime.com/news/wp-content/uploads/2008/03/safari_icon.png"/></p>
  <p>Isn't that a nice picture?</p>
 </div>
</div>

This looks as expected in all browsers, including Safari. In Safari Reader however, the third paragraph "Isn't that a nice picture?" is floating around the image, instead of being on a paragraph of it's own.

Has anybody experienced a similar problem?

like image 582
fhd Avatar asked Jun 16 '10 15:06

fhd


People also ask

How do you insert a line break to text on a Web page?

To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break. Since an HTML line break is an empty element, there's no closing tag.

How do I enable line breaks?

To add spacing between lines or paragraphs of text in a cell, use a keyboard shortcut to add a new line. Click the location where you want to break the line. Press ALT+ENTER to insert the line break.

How do you start a new line after an image in HTML?

The BR tag is used to force line breaks within text. Normally, linebreaks are treated as a space by browsers (except inside the PRE tag). The optional CLEAR attribute is used when you have an IMG image in your text. If that image uses ALIGN=LEFT or ALIGN=RIGHT, the text will flow around it.

How do you break an image in HTML?

The line break tag is the <br> tag in HTML and <br /> in XHTML. A br tag will insert a line break which means the text/image following the tag will be moved to the next line when displayed in the browser.


1 Answers

.post-body img {
  display: block;
}

should do the trick.

like image 179
Morfildur Avatar answered Sep 26 '22 06:09

Morfildur