我正在做一个个人项目,并且无法让图像在某些文本的右侧浮动。
我希望单个段落向左浮动,图像向右浮动,并且在图像旁边也没有任何后续段落。我只想要图片旁边的那一段。我总是希望在图像和文本之间留一点空间。
该站点在这里,图像在“过去”页面上。
在“过去”页面上,图像应浮动在第一段的右侧。
过去的页面 HTML:过去
<div class="bl-content">
<h2>When I was young...</h2>
<p>I wanted to be a <span>crazy cat lady.</span> I then realized that being a crazy cat lady doesn't give me an income but infact, did quite the opposite and took away any money I would have.</p>
<img src="/images/catparty.jpg" style="float:right">
<p>So I chose the next best thing ‒ Web Development and Web Design. I knew it was <i>"my thing"</i> since Grade 6 when I found a drag and drop website maker called Piczo. It was all of the rage when I was 12 years old, I assure you. It wasn't appealing and definitely wasn't user-friendly... but it was mine and I loved it.</p>
<p>I decided to challenge myself more and learn some basic HTML and CSS so that I could get more involved in my new found passion. This lead me to have my own site on Freewebs.</p>
<p>Not too long after having my first Freewebs site I recieved my own subdomain. After that, I recieved my own <i>adoptable</i> domain. I was still young at the time so the best domain name I chose was something along the lines of <span>broken-wings</span> dot something.</p>
<p>On all of the sites that I owned, I would create content for other users with my <strong>amazing</strong> version of Paint Shop Pro (well... it was to me!) which included backgrounds, wallpapers, HTML and CSS tricks, and a lot of other things that I believed were great. I may have not of been the best, but it sure gave me an amazing foundation for school.</p>
</div>
<span class="bl-icon bl-icon-close"></span>
</section>
一些CSS:
/* Custom content */
.bl-content p {
margin: 0 auto;
padding-bottom: 15px;
font-size: 1.7em;
line-height: 1.8;
}
.bl-content p.norex {
font-size: 35px;
text-align: center;
}
.bl-content p span {
padding: 0 10px;
background: #ffffff;
color: #ed1556;
}
如果我没有提供足够的 HTML 或 CSS,我深表歉意。您可以转到提供的链接,但我觉得这很容易解决。这个布局中有很多 CSS 和 HTML,很难确定到底需要显示什么。