开发者

How to prevent CSS inline style when Browser Zoom in?

When using Safari or Chrome, I have a problem when using the Zoom-in view tool. On an image slider it forces开发者_StackOverflow中文版 to add inline style of a DIV element and specifically its height (which obviously overrides any other styles).

The div should be set at 340px, but automatically changes the value to 387px, then 459px etc... incrementally based on zoom level. Also note that the images within the image slider don't change size, and other elements don't change either.

The issue can be seen here the troubling re-dimension... After opening the page zoom in 1 or 2 levels then hit refresh while zooming. When I inspect(with firebug) the element Safari and Chrome adds inline styles:

<div id="djslider-loader40" class="djslider-loader" style="background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; height: 387px; background-position: initial initial; background-repeat: initial initial; ">

How do I prevent this behavior from the browser?


try using this code

<div id="djslider-loader40" class="djslider-loader" style="background: none;height: 387px !important;">


I had similar kind of issue. One of my div element had an inline style height based on its contents. Hence, if i expand the content from JScript, the content would get hidden. Thanks to the example. When I apply height:100% !important, it worked like a charm! Thanks again.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜