作者Tonnny (^~^)
看板Web_Design
标题Re: [问题] css firefox,ie显示不同
时间Wed Sep 6 18:53:08 2006
先感谢回答的前辈们!
有点长,所以回post一篇,
右边我拿掉了,有问题的是左边的按钮,
按钮的制作是只是一个<td>内的背景,hover後换另一个颜色的背景,
我突然想到,有可能问题是这个,
选单是这样写的,
<table>
<tr>
<td background="xxx.gif">
<table>
<tr>
<td class="iBtn">
....
<td>
</tr>
</table>
</td>
<tr>
</table>
iBtn内又定义了background-image: url(../../image/stu_image/iBtn.gif
会不会是因为这样使得iBtn的背景显示有问题?
=====================
※ 引述《Tonnny (^~^)》之铭言:
之前po了文,不过没附上实际网址,
这一篇补上,先感谢指教,
css firefox不正常,ie没问题,
====
网址:
http://www.ee.ntu.edu.tw/eeoffice/tmp.php
IE:
http://www2.ee.ntu.edu.tw/~b9901117/tmp1.jpg
firefox:
http://www2.ee.ntu.edu.tw/~b9901117/tmp2.jpg
css如下:
.iBtn a:link{
color: #001EFF; font-size:9pt; letter-spacing: 1px; text-decoration:none;
padding: 0px !important; padding-top: 8px; width: 160px; height: 28px;
background-image: url(../../image/stu_image/iBtn.gif);
background-repeat: no-repeat; margin: 0 auto;}
.Btn a:visited{除了颜色以外同上}
.Btn a:hovor{除了颜色以外同上}
html:
<td valign="top" align="center" width="160" height="28" class="iBtn">
<a href="index_stu.php?cat=news_stu"> 最新消息 </a></td>
====
测试结果,css内的 width: 160px; height: 28px在firefox内没有作用,
button的背景图只贴在有连结字後面,没办法摊开成160*28
====
感谢高手帮忙指教,Thanks~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.42.22
1F:推 bcse:你的连结我用IE看也没背景,应该是要加display:block;吧 09/06 15:27
2F:推 yukang:图档的位置对嘛? 是不是设错图档的位置 09/06 17:22
3F:推 Tonnny:先感谢楼上...右边我都拿掉了,重点是左边的按钮, 09/06 18:41
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.42.22