Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

i've a code, that change the maxheight of an div and image,
the code is : $j(".enlarged-img").css({ "max-width": "100%", "max-height": "100%" });
when i try it to chrome, it's works and fine, when i tried it at firefox it won't work.

what must i do with that code ?

thanks.
Posted
Comments
Peter Leow 21-Jun-14 10:13am    
It should work. Try upgrading firefox.
Andrew Budiman 21-Jun-14 13:26pm    
my firefox version is 30, and it's stuck at that code. thanks

1 solution

JavaScript
.css({ "max-width": 100%, "max-height": 100% });

OR
JavaScript
.css({ "max-width": 100% });
.css({ "max-height": 100% });
 
Share this answer
 
Comments
Brian A Stephens 24-Jun-14 8:59am    
yes, or .css('max-height', '100%');

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900