我的网站有两个部分应该在类似的庄园中显示。一个显示正确,而另一个没有。顶部将每个元素放在自己的行中,而底部则将
上面和两个图像并排,我想要它们。我的两个问题是:1:为什么坏版本坏了?2:工作版本的哪些部分使其能够正确显示(或者更好的后续问题,css的哪些部分没有帮助它正确显示并且可以删除?
破碎的:
html:
<div id="maintitle">
<span id="chara1"><img src= "<?= $charused ?>" width="150" alt="char2"/></span>
<span id="maintitletext"><h1> Welcome to Born4battle's Wolfenstein 3D page</h1></span>
<span id="chara2"><img src= "<?= $charused ?>" width="150" alt="char2"/></span>
</div>
CSS:
#maintitle{
color: #ffff00;
text-align: center;
}
#maintitle ul{
margin:0;
padding: 0;
list-style-type: none;
}
#maintitle li{
display: inline;
}
#chara1, #chara2, #maintitletext{
margin-top: 0px;
margin-right: auto;
margin-left: auto;
display: inline;
padding: .5em;
width: 110px;
}
在职的:
html:
<div id="share">
<p> Get the official shareware for Wolfenstein 3D and Spear of Destiny below </p>
<span id="getwolf"><a href="ftp://download.dosgamesarchive.com/wolf3d.zip"><img src="http://www.timsooley.com/wolfnow.gif" alt="getwolf"></a></span>
<span id="getspear"><a href="ftp://download.dosgamesarchive.com/destiny.zip"><img src="http://www.timsooley.com/getspear.gif" alt="getspear"></a></span>
</div>
CSS:
#share ul{
margin: 0;
padding: 0;
list-style-type: none;
}
#share li{
display:inline;
}
#getspear, #getwolf{
margin-top: 0px;
margin-right: auto;
margin-left: auto;
display: inline;
/*background: #bbbbbb;
border-top: solid 2px #333333;
border-left: solid 2px #333333;
border-right: solid 3px #999999;
border-bottom: solid 3px #999999;*/
padding: .5em;
width: 110px;
}