What am I doing wrong here? I cannot get the sprites to work correctly. When I inspect the element it is not the right height or width. I have gotten sprites to work having a container div with the background image, but I don’t think having a wrapper is correct in this type of situation.
Here is what I’m trying to do..
<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>
`
All you can see is a small portion of the X.
If I don’t put that blank space between the link, it doesn’t show anything at all… There has to be something I am just doing wrong. What is it? I have inspected tuns of sites and they don’t seem to need that space in there.
This thing works. Please check with this:
Your background image path is wrong.You have to specify the complete image url which is http://www.freeimagehosting.net/newuploads/o2gz4.png
Hope this helps