nicinabox / superslides

A fullscreen, hardware accelerated slider for jQuery.
http://archive.nicinabox.com/superslides
MIT License
1.51k stars 442 forks source link

Using media queries to control cropping / layout of images #318

Open sam-pudle opened 9 years ago

sam-pudle commented 9 years ago

On one page of the example website "http://nicinabox.com/superslides/#2" there is a slide mentioning controlling content layout using media queries, but i have not seen it mentioned any were in the docs.

Ive got it working, by doing the following, for instance if i have an image that i want the focus to be on the far left of the image my css would look like this :

.left-focus-image { position: relative !important; left: 0px !important; }

Obviously this can be inside of media queries as appropriate, but what im unsure about is wether using position: relative; and setting a left / right / top / bottom value is the correct way of defining the crop / layout, or is there another way superslides has in mind to do this with css. ?

ArhamAliQureshi commented 9 years ago

What you mean by control cropping / layout ? And I don't feel any problem with defining there margins unless its working fine. But do try to avoid giving negative margins unless it not very much necessary,