作者:姬跋征 | 来源:互联网 | 2023-09-14 13:05
Thisismysite:http:portable-ebook-reader.net这是我的网站:http:portable-ebook-reader.netThesearc
This is my site: http://portable-ebook-reader.net
这是我的网站:http://portable-ebook-reader.net
The search bar at the top is made up of two background images. One is for where you'd type in the search phrase, the second is the actual button to search.
顶部的搜索栏由两个背景图像组成。一个用于输入搜索短语的位置,第二个是要搜索的实际按钮。
My problem is that in Chrome the search button image is 2px too HIGH. But it looks perfect in IE and FF. And if I modify the CSS (margin-top: 2px) then Chrome looks good but IE and FF are messed up.
我的问题是在Chrome中,搜索按钮图像的亮度为2px太高。但它在IE和FF中看起来很完美。如果我修改CSS(margin-top:2px),Chrome看起来不错,但是IE和FF搞砸了。
Any ideas? I've been searching for hours without any luck.
有任何想法吗?我一直在寻找没有运气的好几个小时。
Thanks!
7 个解决方案
2
Get it looking right for FF first. Then get it looking right for both FF and Chrome. Only after you have it looking right in FF and Chrome, should you start concerning yourself with how it looks in IE. After you achieve this, then start adjusting for IE, if necessary, using *
before your style rules, example: *margin-top:2px;
adjusts the top margin for IE7 and IE6 exclusively.
首先让它适合FF。然后让它适合FF和Chrome。只有在你在FF和Chrome中看起来正确之后,你才应该开始关注它在IE中的外观。完成此操作后,如果需要,在样式规则之前使用*开始调整IE,例如:* margin-top:2px;仅调整IE7和IE6的上边距。
After looking at your code, it's difficult to say exactly what may be causing the problem without being able to test different solutions on my system. But here are some things you can try to change in your styles.css file (located in your 'chronicle' folder within your 'themes' folder) that may correct the issue:
在查看您的代码之后,如果不能在我的系统上测试不同的解决方案,很难确切地说出可能导致问题的原因。但是这里有一些你可以尝试在styles.css文件中更改的东西(位于'themes'文件夹中的'chronicle'文件夹中)可以解决问题:
- apply the same height value to both your
#s
and #searchsubmit
rule-sets
将相同的高度值应用于#s和#searchsubmit规则集
- remove
font: 14px "century gothic", Arial, Helvetica, sans-serif;
from #searchsubmit
删除字体:14px“世纪哥特式”,Arial,Helvetica,sans-serif;来自#searchsubmit
- after you do the above, if it still doesn't look right in both FF and Chrome, set the first and second padding values for your
#s
rule-set to 0
(i.e. change 8px
to 0px
) and then add a margin-top:
declaration to both #s
and #searchsubmit
and give both the same value, for example margin-top:8px;
执行上述操作后,如果在FF和Chrome中仍然看起来不正确,请将#s规则集的第一个和第二个填充值设置为0(即将8px更改为0px),然后添加margin-top :声明#s和#searchsubmit并给两个相同的值,例如margin-top:8px;
- if you're still having issues, try copying this line:
font: normal 100% "Tahoma", Arial, Helvetica, sans-serif;
from your #s
rule-set and add it to your #searchsubmit
rule-set so that it appears in both rule-sets.
如果你还有问题,请尝试复制这一行:font:normal 100%“Tahoma”,Arial,Helvetica,sans-serif;从您的#s规则集中将其添加到您的#searchsubmit规则集中,以便它出现在两个规则集中。
There's so many different possibilities that could be causing the problem, which is why you may want to try one of the aforementioned hacks if you can't figure out the source of the problem.
有很多不同的可能性可能导致问题,这就是为什么你可能想要尝试上述黑客之一,如果你无法找出问题的根源。