0

This is for a drpal 7 install.

Is there a way to apply the same function they discuss in this thread

https://stackoverflow.com/questions/10373349/height-and-width-of-background-picture-adapt-to-each-screen-size

to a whole div instead of a single image? For example, I have a drupal 7 install. I'm using skeleton theme. I have been requested by the client to have a full screen images slider as a the background in the homepage. I have given the images a 1680px Image style and calling the block from a custom template file for the front-page with $ block = module_invoke. That's aright but, it obviously doesn't adjust to screen res. If I give the div one of the skeleton's css classes, the whole layout gets messed up.

I'm trying to find an alternative via custom js.

Is that possible to achieve the same behaviour as in the demo in the link, for the slideview block?

Demo- http://so.devilmaycode.it/height-and-width-of-background-picture-adapt-to-each-screen-size/

If so, please indicate how to add the js to the code, where and how. Thank you!

  • Have you tried this in css @media screen and (max-width:800px){.....................} add this css in bottom and write css for different resolutions, hope it helps you! – Bala Feb 21 '13 at 11:34
  • THank you for the tip. I'll try it and get back to you. Although if you read above, I mentioned adding Skeleton classes that precisely do that, without success. Perhaps writing my own works. Will let you know. – cara Feb 22 '13 at 13:32
  • Thank you Bala, but the css @media did not do what i wanted. Also for some reason it's not resizing. Once it loads with the browser window at a certain size, it stays like that...I'll try with a different question – cara Feb 28 '13 at 19:20
0

Found two options: cycle2 for which the project is still in development stage: http://drupal.org/sandbox/BenYoung/1832338 (and did not work when following the installation guidelines, since I never got the Cycle2 option in the dropdown and needs jquery 1.7 which apparently causes a lot of trouble)

And one that is actually fully functional Flexi Slider here http://drupal.org/project/flexslider , for which I found also this great tutorial here http://coldfrontlabs.ca/blog/creating-responsive-image-slider-galleries-adaptive-images-drupal-7. Strange that they're so well hidden when adaptive design and full width sliders are so requested now...

Now it works as I wished for it to be, except for one thing I will ask a different question for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.