【发布时间】:2013-06-06 17:14:03
【问题描述】:
我将两张图片垂直放在一起,但有一个间隙,我尝试了所有方法,但我找不到问题所在? 在这个网站上(左下黄色图片), http://www.jamesxu.com.au/contact
HTML
<div class="pic_wrap">
<img id="contact" src="http://www.jamesxu.com.au/wp-content/themes/BLANK-Theme-realone/images/contact_01.png">
<a class="email" href="mailto:hi@jamesxu.com.au"> </a>
<a class="message" href="http://www.jamesxu.com.au/contact/"> </a>
</div>
CSS
.pic_wrap {width:216px; margin:auto;}
a.email {background:url(images/ico.png) left -80px no-repeat; display:inline-block; width:216px; height:35px; line-height:0; font-size:0;}
a.email:hover {background:url(images/ico.png) left -120px no-repeat ; }
a.message {background:url(images/ico.png) left -164px no-repeat; display:inline-block; width:216px; height:45px; line-height:0; font-size:0;}
a.message:hover {background:url(images/ico.png) left -208px no-repeat ;}
【问题讨论】:
-
该站点无法访问,但请尝试删除两个元素上的填充和边框... (
padding: 0; border: 0;) -
您应该始终在问题中包含相应的
htmlcode,而不仅仅是链接到您的页面。否则,如果您解决了您的问题或您的页面消失了,那么您的问题对其他人的帮助就没有那么大了。 -
对不起,我尝试从我的主题中提取 HTML 但不起作用。所以只要把 CSS 放在这里。
-
致Kroltan,来自bluehost.com的主机,不知道为什么无法访问。