Firefox 3.6和CSS与以前版本的Firefox 3.5及更高版本有何不同? [英] Firefox 3.6 and CSS difference from previous versions of Firefox 3.5 and back?

查看:52
本文介绍了Firefox 3.6和CSS与以前版本的Firefox 3.5及更高版本有何不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在升级到Firefox 3.6时,输入框上的CSS断开了.填充增加了-也可能是字体大小有所不同.想知道是否还有其他人看到过这个问题.不太清楚.

So, in upgrading to Firefox 3.6, the CSS broke on input boxes. The padding has increased -- it might also be the font-size is somehow behaving different. Wondering if anyone else has seen this problem yet. Can't quite figure it out.

HTML代码:

<form>
    <fieldset>
        <label for="inputField">Label</label>
        <input type="text" id="inputField" />
    </fieldset>
</form>

CSS代码:

form fieldset label {
    display:block;
    font-size:1.2em;
    font-weight:bold;
    padding:12px 9px;
}
#jumptoBox fieldset input {
    background: url("../images/input.png") no-repeat scroll left top transparent;
    font-size: 1.2em;
    padding: 4px 5px 16px;
    width: 99px;
    height: 29px;
}

(图片尺寸:109宽度x 34高度)

(Image dimensions: 109 width x 34 height)

因此需要注意的一件事是,该修复程序(如下所述)包括删除高度,或至少将其设置为自动,然后通过使用填充进行补偿(此修复程序在很多方面困扰着我,但我们暂时将其保留).但是,BUT Webkit现在似乎有其自身的问题,因为它想根据所有内容的高度使文本垂直居中(忽略行高的任何证据).换句话说,如果您想使文本垂直靠近顶部,则无法找到一种方法.

So one thing to note, the fix (as outlined below) includes removing the height, or at least setting it to auto, and then compensating for it by using padding (a fix that bothers me on many levels, but we'll set that aside for now). BUT webkit seems to have its own problems with this now, since it wants to center the text vertically (ignoring any evidence of line-height) according to the height of everything. In other words, if you want the text vertically closer to the top, I haven't been able to figure out a way to do that.

想法?

推荐答案

以下是一些解决问题的技巧,因为您没有提供足够的信息来提出任何具体建议:

Here are a few tips to fixing the problem, as you haven't posted enough information for any concrete suggestions:

  • Do you use a doctype?
  • Do you use a reset stylesheet?
  • Have you validated your markup (HTML and CSS)?

这篇关于Firefox 3.6和CSS与以前版本的Firefox 3.5及更高版本有何不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆