Mon, 2012-11-19 09:32
hello.
im having trouble with the sizing of my background image
if i do this the image resizes to 300px which is great:
#wrapper{ width:100%; height:300px; } .size{ width:300px; height:300px; margin: 0 auto; } .size img{ width:100%; } <div id="wrapper"> <div class="size"> <img src="cont-bg.png"/> </div> </div>
but if i do this, the image will not resize with the div.
#wrapper{ width:100%; height:300px; } .size{ width:300px; height:300px; margin: 0 auto; background-image:url(cont-bg.png); background-repeat: no-repeat; } <div id="wrapper"> <div class="size"> </div> </div>
so....
how do i get my image to resize to fit the 300x300 div when adding the image into the css and not in the html ???
thanks
ricky
Mon, 2012-11-19 11:47
#1
Hi ricky, Have a look into
Hi ricky,
Have a look into background-size
Mon, 2012-11-19 22:11
#2
no good
hello.
thanks but i tried that and they dont work. i guess its my browser but im looking for an answer css2 stylee