Как разместить правильное изображение ниже одной строки контента - PullRequest
0 голосов
/ 02 сентября 2018

Это мой контент My content

Как идеи для изображения плавают справа от содержания ниже 1 строки My content 2

Это мой код

<div class="single-content">
   <div class="floating-image-right">
       <img src="https://dl2.macupdate.com/images/icons256/30017.png" />
   </div>
   <div class="entry_content">
<strong>CleanMyMac</strong> makes space for the things you love. Sporting a range of ingenious new features, CleanMyMac lets you safely and intelligently scan and clean your entire system, delete large, unused files, reduce the size of your iPhoto library, uninstall unneeded apps or fix the ones that started to work improperly, manage all your extensions from one place and do much more – all from one newly designed and beautifully simple interface.
   </div>
</div>

<style>
.floating-image-right {
    float: right;
    max-width: 128px;
}
</style>

1 Ответ

0 голосов
/ 02 сентября 2018

Вы должны быть действительно точны в том, где вы разместите свой тег floating-image-right.

https://jsfiddle.net/fgpLs4u5/2/

body {
  max-width:800px;
  margin: 0 auto;
}
span.img-demo {
  background: red;
  display: block;
  width: 300px;
  height: 150px;
  float: right;
  margin: 7px 0 10px 10px;
  padding: 0;
}
<p class="content">
 This is some content here. This is some content here. This is some content here. This is some content here. <span class="img-demo"></span> This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. 
</p>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...