我试图在我的网站主页上连续显示三张图片。这在我的机器上显示为我想要的,但是在其他机器上尝试时,布局切换到一行上的 2 个图像,然后在新行上切换到第三个图像。继承人的代码:
<body>
<div id="container">
<div id="header">
<h1>
<!--<a href="#"><img src="tracylogo7.jpg" alt="Millington and Hope" /></a> -->
<a href="#"><img src="tracylogoup6.jpg" alt="Millington and Hope" /></a>
</h1>
<h2>
<!--<a href="#"><img src="tracylogo5_header.jpg" alt="Millington and Hope" /></a> -->
</h2>
</div>
<ul id="nav">
<li><a href="index.html">Home</a></li><!--
--><li><a href="stock.html">Stock</a></li><!--
--><li><a href="events.html">Events</a></li><!--
--><li><a href="contact.html">Contact</a></li>
</ul>
<div id="box">
<a href="#"><img src="home4.jpg" alt="Image 1" /></a>
<a href="#"><img src="home_mir.jpg" alt="Image 2" /></a>
<a href="#"><img src="home_urn.jpg" alt="Image 3" /></a>
</div>
<div id="box2">
<a href="#"><img src="tracylogosmall.jpg" alt="Logo" /></a>
</div>
<div id="footer">
<p class="client">Tel: 07858740 E-mail: contact@millingtonandhope.com</p>
</div>
</div>
</body>
<style type="text/css">
html,body
{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
body
{
background:rgb(171,163,144);
text-align: center;
min-width: 600px;
}
#container
{
margin:0 auto;
background:rgb(171, 163, 144);
width:80%;
}
#header
{
padding: 0px;
color: white;
width:100%;
text-align:center;
}
#footer {
position:fixed;
left:0px;
bottom:0px;
height:25px;
width:100%;
background:rgb(151,143,124);
border-top:solid 1px white;
}
.client
{
color:white;
margin:3px auto;
text-indent:1cm;
text-align:left;
}
#sold
{
color: red;
}
#box
{
position:relative;
margin:0 auto;
width:100%;
height:200px;
margin-top:100px;
}
#box img
{
margin:0 auto;
border:solid 1px white;
margin: 10px;
}
#box2
{
position:relative;
margin-top:260px;
width: 100%;
}
#box2 img
{
margin:0 auto;
opacity:0.5;
filter:alpha(opacity=50);
}
谁能帮我解决这个问题?