Sarawut Positwinyu
Sarawut Positwinyu

Reputation: 5042

Set an image width depend on another image using css only

Is it possilble to set an image width equal to another images using css only

image 1 might be any size, after loaded image 2 size will be adjust according to image 1

Upvotes: 0

Views: 150

Answers (1)

Andy
Andy

Reputation: 14575

If they share a container, you can do something like this:

http://jsfiddle.net/qVfsa/1/

Upvotes: 1

Related Questions