开发者

Chrome and Safari Hack

开发者 https://www.devze.com 2022-12-11 08:22 出处:网络
I have the following style: table.jqTransformTextarea td#jqTransformTextarea-mm textarea{ margin:0; } This works as expected in Firefox, Opera, Internet Explorer 7,8 and 6.

I have the following style:

table.jqTransformTextarea td#jqTransformTextarea-mm textarea{
    margin:0;
}

This works as expected in Firefox, Opera, Internet Explorer 7,8 and 6.

However, to make it work in Chrome and Safari I need to do:

table.jqTransformTextarea td开发者_如何学JAVA#jqTransformTextarea-mm textarea{
    margin:10px 0 0 10px;
}

How can I set this style to Chrome and Safari only? I would prefer not to use JavaScript (or jQuery) to get this effect, and get the solution with CSS only, or HTML (but I don't know if there is a tag like: <!--[if IE]> that selects this two browsers).


Just solved my own question:

@media screen and (-webkit-min-device-pixel-ratio:0)
{ table.jqTransformTextarea td#jqTransformTextarea-mm textarea { margin:10px 0 0 10px; } }
0

精彩评论

暂无评论...
验证码 换一张
取 消