This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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.