1
我有以下HTML到层内的中心图像和链接:在一个层的浮动图像,在另一个内部层
编辑:一个更好的例子
<style> body {
background-color:#000;
color: #FFF;
} a { font-family: "Broadway",
Broadway,monospace; font-size:
14px; color:
#FFF; }
#images a {
width: 24.99%; display: block;
float: left; text-align: center; }
#container; { top: 30%; left: 15%; }
#main { position: absolute; width: 800px; height: 600px; }
#logo { float:left; background-image:url("1.jpeg");
width: 104; height: 100; }
</style> <div id="main"> <div
id="logo"> </div> <div
id="container"> <div id="images">
<a href="1.html" >
<img src="1.gif" alt="x" width="181" height="173" border="0"
/><br />
One </a> <a href="2.html" >
<img src="2.gif" alt="x" width="181" height="173" border="0"
/><br />
Two </a> <a href="3.html" >
<img src="3.gif" alt="x" width="181" height="173" border="0"
/><br />
Three </a> <a href="4.html" >
<img src="4.gif" alt="x" width="181" height="173" border="0"
/><br />
Four </a> </div></div></div>
你如何定位你的外部div?使用第二个例子似乎对我有用。 – 2008-11-20 14:00:21
这两个示例都可以正常工作,具体取决于您如何定位。你能和我们分享你想做什么吗?你为什么使用百分比作为职位? – 2008-11-20 14:18:11