This content has been marked as final.
Show 4 replies
-
1. Re: Responsive images CSS help
Jon Fritz II Nov 19, 2013 10:56 AM (in response to rgreen001)I would place a responsive <img> and use javascript to alter its source (using 3 separate images), rather than attempt to make an empty <div> responsive yet constrict it to the dimensions/perspective of its background image.
Here's some code that would do the trick...
<img src="start-image.jpg" onmouseover="this.src='hover-image.jpg';" onmouseout="this.src='start-image.jpg';" onmousedown="this.src='down-image';" />
-
2. Re: Responsive images CSS help
Nancy O. Nov 19, 2013 11:45 AM (in response to rgreen001)Background-images don't re-size to layout. Only foreground images do that.
Nancy O.
-
3. Re: Responsive images CSS help
rgreen001 Nov 19, 2013 12:27 PM (in response to Nancy O.)Thank you Nancy. I didn't know that. Cheers.
-
4. Re: Responsive images CSS help
rgreen001 Nov 19, 2013 12:27 PM (in response to Jon Fritz II)Thank you Jon for the fast response.
I previously would use three seprate images - this is a new route for me.
I think I'll go back to the separate images and try your idea. Cheers.


