A close button (and text) on top of a fluid centered image II
by
, 04-10-2015 at 10:42 PM (9190 Views)
I learned a few things after I posted this on my blog about putting a close button on top of centered fluid images.
I used jquery and translate in CSS transforms there to do the job. But I found that it can also be done with the help of a combination of window.innerWidth/Height and element.clientWidth/Height. As window.innerWidth/Height and element.clientWidth/Height are also supported by older browser, a technique using these methods must be preferred. Demos and explanations here.