嘿伙计们。我已经阅读了我所能读到的东西,我当然不是大师,但我正在myspace.com上整理一个同事的个人资料,我在屏幕的每一边和两个div一起工作,我希望他们对齐,这样他们就在一起了。我试过浮动:左;浮动:右;我试过边距:右;在div 1上等等。
你能帮忙吗?
以下是网站:http://www.myspace.com/jonasjohansen
这是div1:的信息
<div class="textBox" align="left" style="width: 290px; float: left;
word-wrap:break-word">
<span class="orangetext15">
BANDS
</span>
<b>MOVE</b><br />
Fredrik ....balbalbalbla
</div>
<style>
.textBox {
position: relative;
left:-320px;
top:-120px;
width: 0px;
height: 0px;
overflow: visible;
z-index: 1;
background-color: transparent;
border:none;
}
</style>这是div2:的信息
<style>.i {display:none;}{!-eliminate bio header!-}table table td.text table td.text {display:none;}{!-recover in shows and friends-!}table table td.text div table td.text,table table td.text table.friendSpace td.text {display:inline;}{! move up our custom section. You may change px value !}div.myDivR {position:relative; top:0px; margin-bottom:-300px; }{! you can apply style to the custom div !}div.myDivR {background-color:white; border:2px solid; border-color:darkgreen; float: right;}</style></td></tr></table></td></tr></table><span class="off">Re-Open Bio Table give it our own Class </span><table class="myBio" style="width:435px;"><tr><i class="i"></i><td class="myBioHead" valign="center" align="left" width="auto" bgcolor="ffcc99" height="17"> <span class="orangetext15"> ABOUT JONAS JOHANSEN</span> </td></tr><tr><td><table class="myBioI"><tr><td><span class="off"></span>
blalbalbalbalbla
<span class="off">END Bio Content </span>发布于 2010-04-27 11:59:43
看起来,您的问题来自这样一个事实:在布局的右侧的td元素中有一个带部分(它似乎属于布局的左列)。当您将float: left;应用于带带td时,它会一直将其悬浮到左侧列(通过浏览器呈现的怪癖),但它在右侧列中为td留出了空间。
您能在页面的代码中移动td吗?我不熟悉Myspace中什么是可编辑的,所以我不确定,但这应该可以很容易地解决您所遇到的问题。
https://stackoverflow.com/questions/2717042
复制相似问题