Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image positioning #19

Closed
keithlogan opened this issue Sep 23, 2010 · 6 comments
Closed

Image positioning #19

keithlogan opened this issue Sep 23, 2010 · 6 comments

Comments

@keithlogan
Copy link

Hi,

Firstly, thanks for developing a fantastically simple plugin - great job!

I'm having a little trouble on how the image resizing seems to work. The plugin seems to center the image that is being used as a background on both axis. I'm finding that I'm losing the bottom part of the image, can you vertically alignment the image from the bottom up?

Thanks

@srobbin
Copy link
Member

srobbin commented Sep 23, 2010

Hi Keith,

Thanks for the kind words about backstretch. Much appreciated.

Yes, the plugin does center the image. If you want to turn that off, use the centeredX and centeredY options, and set them to 'false.' That will align the image from the top-left. Unfortunately, the plugin doesn't support aligning from the bottom or bottom-right. Though, if you're comfortable with JavaScript, then it should be easy to fork this project and make the necessary changes.

http://github.com/srobbin/jquery-backstretch/blob/master/README.textile

Hope that helps.

–Scott

@keithlogan
Copy link
Author

Hi Scott

Thanks for the quick reply.

The issue I'm finding is that the bottom (important part) of the image is getting missed out depending on what screen someone views it on. I'm just starting out with Javascript and unfortunately don't have the know how. Can you give me any tips perhaps on the best image dimensions to get round this for example?

Cheers
Keith

@srobbin
Copy link
Member

srobbin commented Sep 23, 2010

Hi Keith,

I believe that if you just change the bgCSS = {left: 0, top: 0} to bgCSS = {left: 0, bottom: 0} in the _adjustBG function, and set centeredX and centeredY to 'false,' that it will work as you'd like. Though, I haven't tested it.

Unfortunately, beyond this reply, I won't be able to help any further. Best of luck.

–Scott

@joerails
Copy link

Hello,
i would like to know where to place my images because my backstretch is not even loading images

@maplesyrupsucker
Copy link

In case anyone was curious, I can confirm @srobbin's solution works great! Thanks for sharing that!

@apendua
Copy link
Contributor

apendua commented Sep 9, 2014

FYI, please take a look at #379

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants