I am currently creating a website and facing to a strange problem friends.I need your help to solve my issue.I have put a image on my website using below css code.It's working perfectly with firefox but not working with IE well and with chrome i can't even see the image.This problem comes when I set the size using '%' values like on my example for 'px' setting it's working very well.But for this situation it's important to place this as a percentage. .desc-img{ width:60%; height:60%; margin-left:20px; } HTML: I have attached a screenshot of all main browsers with this message for your ease. Waiting for a help. Thank you
This should work just fine. It's part of the CSS 2.1 Standard. You can view this standard here: http://www.w3.org/TR/CSS2/visudet.html#the-width-property Maybe have a defined width for the image and then use the css you have. You could add the height and width attributes in the image tag for this or use it in your external style sheet.
You set it to 60% but 60% of what? It's always the parent element so what width is the parent set to?
Thank you everyone for your helps.I solved it, it was a problem of a <p> tag before <a href> tag.I removed that <p> tag now it's working well. Anyway thank you again for your quick responses