Control css style for image after preview in Chrome

I have an html page where we have images, text and two buttons

1.print print page to print page

2. Hide / Show (switch button) to hide / show under the image.

The image on the page is dynamically generated using the remote service.

In Google Chrome When I click the Hide / Show button to hide the image and click the Print button, the print preview page will appear on the same page. Then I cancel the print page and back to the page. Then I click the Hide / Show button again to show the image

here the problem is that the image is not displayed on the page.

Using firebuglite, I found that the inline css style, such as the width and height for the image, is 0, and therefore the image does not appear on the page. How can I control the CSS style for an image after previewing, and this problem only occurs in Chrome. Please, help.

+4
source share
1 answer

it uses a CSS browser using javascript: http://rafael.adm.br/css_browser_selector/ you can use this and then add a class:

.chrome #btn{
height:30px !important;
width:100px !important;
}
+1
source

All Articles