[英]HTML/CSS - Having trouble centering the moving text paragraph on top of the image
[英]Moving text to top of paragraph/center next to image
我有一张图片,我想在图片的右边添加它的标题和它的基本描述。 我尝试使用位置:相对,绝对。 填充和边距:0px。
链接是: URL
游戏“ Rock,Paper,Sciseors”和“ Miji”的游戏标题应位于图像右上方,然后在其下添加游戏说明。
谢谢!
在页面上播放项目而不用弄乱特定的边距和填充(在忙碌的页面上可能会弄乱)的一种简单方法是选择位置(相对,绝对等),然后使用向左,向右和顶部在页面上移动它。
例如
.exampleClass {
position: relative;
left: 20px;
top: 5px;
}
试一试数字和位置类型,直到您对它们如何影响项目有很好的了解,并且可以毫无问题地调整对象在页面上的位置。
<a href="Games/RPS.html"><img src="Games/RPS.jpg" width="15%" height="15%" alt="Rock, Paper, Scissors"></a>
首先使用这两个标签
<span id="gameTitle">Rock, Paper, Scissors, Shoot</span>
将这些位置替换为两个标签!
<span id="gameTitle" style=" float: left;">Rock, Paper, Scissors, Shoot</span>
将跨度设置为style="float: left";
添加<br/>
这些之间<a href....
和<span id=....
您好,根据我的理解,您在https://jsfiddle.net/up1v5j0z/28/下尝试进行此类操作
<ul>
<li><div class="content"><img src="http://i.stack.imgur.com/FZVih.jpg?s=328&g=1" height="200px";><h4>Roshan Padole </h4><p>Senior Software Engineer and DigitalMarketing Experts</br>Management of the manpower with effective positive results. </p></div><br style="clear:both"></li>
</ul>
.content img {float:left}
[https://jsfiddle.net/up1v5j0z/28/][1]
希望这个能对您有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.