English 中文(简体)
网页上千字射电高度
原标题:webkit vs firefox height of text

我的案文非常大(体大小28)。 I m试图在固定载货集装箱内纵向连接。

我以眼光这样做,只是设定一个差点,以便它能够进入正确的地点。 然而,在Impat,需要20px的比值,在Safari I,需要15px(太低)。 我认为,差异在于,在Sissa,文本内容比在Landre的文字内容是片面的,其中略微包含一层白色空间,在Empa(......)中,文本内容的顶端正好在案文开始的时候。

I ve tried all kinda of display combinations with line-heights and perhaps adding a width/height for the text and whatnot. Nothing works.

我能做些什么来保持这一一致性? 我仇恨使用联合材料,但似乎是唯一的选择。


问题回答

供跨浏览器CSS正常化 d 我建议重新编号——YUI3有好评,Twitter Bootsetto是另一个好兆。 它基本上把dding子和边缘 sets到0,这样所有浏览器都会发生,只遵守Yours规则而不是自己的违约规则。

为使案文与集装箱纵向一致,如果案文单行一条,则使用<条码>线-八<>条码/条码>的财产,并使它与集装箱高度相等。

For example:

CSS:

div {
    height:300px;
    width: 400px;
    line-height: 300px;
    font-size:28px;
    background-color:#F0F0F0;
}

<>光>:

<div>
   Some vertically centered text
</div>

Example: http://jsfiddle.net/Djvv7/

你们需要采用重新分类的办法。 在所有项目中采用良好做法。 我最著名的是:http://meyerweb.com/eric/tools/cs/reset/“rel=“nofollow”http://meyerweb.com/eric/tools/reset/





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Private FireFox plugin

I m looking at getting a FireFox plugin developed - but is it possible to create a plugin that is for private use only, so only those I share it with have it and not open to the masses? Need this for ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Cross-browser development

I m developing a web application for a new service, starting from Firefox 3.5. The interface design is tableless, only using divs + CSS & performance-blessed practices. Now, while being ...

Cross browser way of setting IFrame to "about:blank"?

Does anybody know a proper, cross-browser way to "empty" an IFrame? Is "about:blank" recognized without error across all browsers? Is it valid to give an IFrame an empty src?

热门标签