我正在WordPress中创建一个网站,它进展顺利,但每当我尝试将图片添加到网站的页面时,文本都不会包围它们。这些页面应该是在你的WP帐户内部创建的,因此涉及的编码很少,而且每个页面都有自己的编码和格式,就html而言。我愿意改变CSS来解决这个问题,但我不知道从哪里开始。以下是“关于我们”页面的代码:
Cougar Electric Car Company is made up of students at
<a href="http://www.kenn.cr.k12.ia.us/" target="">Kennedy High School</a> in Cedar Rapids, Iowa. Students work in teams to design and construct safe, energy-efficient electric one-person vehicles that they showcase during a series of rallies across the
Midwest. This is hands-on education. Team members apply what they’ve learned in math science, and or vocational education – and more.
<img style="float: right;" src="http://leifsegen.com/sandbox/livia_t/electric-car/wordpress/wp-content/uploads/2016/02/IMG_5139-300x225.jpg" alt="IMG_5139" width="300" height="225" />
<h6>The program is designed to challenge students to:</h6>
<ul>
<li>Apply classroom lessons to build a one-person light electric vehicle</li>
<li>Design and engineer the vehicle to roll safely and efficiently</li>
<li>Use problem-solving skills</li>
<li>Promote efforts in the community to gain support</li>
<li>Compete against other schools to see whose vehicle performs best</li>
<li>Document the design/build/compete process</li>
</ul>
<h6><strong>Since 1997</strong></h6>
The program was launched by two students and Kennedy teacher Barry Wilson in 1997. Since then, the program has impacted hundreds of students and sparked interest in manufacturing, engineering, automotive, alternative energy, and many more career paths.
Here是我的“关于我们”页面的链接。
答案 0 :(得分:0)
在您的链接页面中,您的img标记看起来位于另一个段落标记下方的不同段落标记内。由于段落标记是块元素,因此它们堆叠而不是允许内联流。
要解决此问题,您需要转到编辑帖子/页面区域,并将媒体放在要包围的段落的开头(或者,无论您想要多少行开始包装)。单击图像,然后选择看起来像围绕它的线条框的框。有关示例
,请参阅我的屏幕截图通过将图片标记放在段落所在的同一段落标记内,然后给它一个浮点数:右/左属性
答案 1 :(得分:0)
将图片移到<ul>
内以解决您的问题。已经过测试及其工作
<ul>
<li style="list-style: none;"><img style="float: right;" src="http://leifsegen.com/sandbox/livia_t/electric-car/wordpress/wp-content/uploads/2016/02/IMG_5139-300x225.jpg" alt="IMG_5139" width="300" height="225"></li><li>Apply classroom lessons to build a one-person light electric vehicle</li>
<li>Design and engineer the vehicle to roll safely and efficiently</li>
<li>Use problem-solving skills</li>
<li>Promote efforts in the community to gain support</li>
<li>Compete against other schools to see whose vehicle performs best</li>
<li>Document the design/build/compete process</li>
</ul>