July 3, 2010
how to set image width and height 100% from css?
Question by mina
my code-
background:url(images/menu_edu.jpg) no-repeat;
but but only half of image is getting displayed.
Answer by Starx
If you want to display your image in full size, no need to use CSS for this
Dont give height and width attribute to the <img>
tag like
<img src="this.jpg" />
it will display in full size
But if you want your <div>
to show its background in full size, then is no other option than assigning the exact image dimensions