我在这里做错了什么?我无法让精灵正常工作。当我检查元素时,它不是正确的高度或宽度。我已经得到了精灵的工作有一个背景图像的容器div,但我不认为在这种情况下有一个包装是正确的。css和精灵 - 意外的结果
这里是我想要做的..
<html>
<style>
.bottomtable{display:block;}
.bottomtable .close {float: right;margin-right:5px;margin-top:25px;display:inline;position:relative;background-image:url('http://www.freeimagehosting.net/o2gz4');background-position:-278px -18px;height:7px;width:7px;}
.bottomtable .close a {height:7px;width:7px;}
.bottomtable .titletext{text-align: right;float: right;margin-right:5px;margin-top:-20px;display:block;}
.bottomtable h5{margin:0;padding:0;font-size: 14px;font-weight:normal;display: inline;}
.bottomtable ul {display:block;padding:5px;margin:0;}
.bottomtable li {list-style-type:none;padding:10px;margin:0;height:75px;display:block;}
.bottomtable li a{text-decoration:underline;font-weight:bold;display:block;margin-bottom:5px;}
.bottomtable li a span{display:block;text-decoration:underline;font-weight:bold;margin:2px 0 4px;}
.bottomtable ul img {display:inline;float:left;margin-top:-2px;margin-right:20px;}
</style>
<body>
<div class="bottomtable">
<ul>
<li><h5><a href="#">some title</a></h5><a href="javascript://close" class="close" title=""> </a>this is some text here..............<div style="clear: right;"></div> </li>
<li><h5><a href="#">some title</a></h5><a href="javascript://close" class="close" title=""> </a>this is some text here..............<div style="clear: right;"></div> </li>
<li><h5><a href="#">some title</a></h5><a href="javascript://close" class="close" title=""> </a>this is some text here..............<div style="clear: right;"></div> </li>
<li><h5><a href="#">some title</a></h5><a href="javascript://close" class="close" title=""> </a>this is some text here..............<div style="clear: right;"></div> </li>
</ul>
</div>
</style>
</html>
`
所有你能看到的是X的一小部分
如果我不把那链接之间的空白空间,它根本不显示任何内容...必须有一些我只是做错了。它是什么?我检查了网站的tuns,他们似乎并不需要那里的空间。
哪个背景精灵从http:// WWW。 freeimagehosting.net/o2gz4你想展示? – Sabari 2012-01-29 09:12:49
这里发生了什么,为什么你有明确的权利的divs?我认为你需要回过头去学习一些关于CSS及其工作方式的知识。 如果你能告诉我们你想要的结果,我们可以帮你重写那个CSS :) – Kyle 2012-01-29 09:15:22
我正在试图做小X. – 2012-01-29 09:22:12