Div内容未显示在正确的位置,因为在div定位之前:相对[重复]

问题描述 投票:0回答:2
我有这样的代码:

<div style="position:relative"> <div style="float:left; width: 183px; background-color:#c1cba9; color: #000000;"><img border="0" alt="Product categories" title="Product categories" src="graphic/categrieshead.png" width="179" height="43"><br /> <div style="margin-left: 10;">Links goes here</div><br /> <img border="0" src="graphic/catbot.png" width="179" height="17"></div> <div style="float:left; width: 480px; height:100px; text-align: center;"><img border="0" src="graphic/description.png" width="232" height="81"><br /><div style="text-align: left; margin-left: 10;">asasasas</div></div> <div style="float:left; width: 322px; height:100px; text-align: center;"> <div style="width: 300px; color: #ffffff; background-color:#6b8861; font-size : 34px;">Item title</div> <div style="width: 300px; color: #ffffff; background-color:#6b8861;"><div style="width: 296px; margin: 2 2 2 2; background-color:#ffffff;">Item picture</div><div style="width: 300px; height: 2px; background-color:#6b8861; color: #6b8861;"></div></div> <div style="width: 300px; color: #801010; font-size : 60px;">Price: 20£</div> </div> </div>

我需要添加div,其中内容(文本)将出现在这三个divs下,但是通过简单地添加它,文本就不会出现在正确的位置(在右侧边界之外),我如何在提到的那部分之后添加div会出现在预览中的该部分下面吗?
html css position
2个回答
1
投票

1
投票
© www.soinside.com 2019 - 2024. All rights reserved.