This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
In my html page I have one div tag with id 'somediv'.
On page load I want to set the div size, which is the size of the image.
To do this I created a new Image object & set the size of the div.
After setting the div size to the size of the image I set the image as background of the div object.
(Please see the above code.)
When I tried the code with Mozilla, the div get the size of the image.
But when I tried the same with Internet Explorer: The div is set to the size of the image.
But when I tried the same with different image sizes, in some cases the div did not take the size of the image.
This faulty behavior seldom happens, but I want it to completely resolve.