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

img-responsive #59

Open
Somel1978 opened this issue Apr 25, 2020 · 6 comments
Open

img-responsive #59

Somel1978 opened this issue Apr 25, 2020 · 6 comments

Comments

@Somel1978
Copy link

It seems whenever I try to use img-responsive to create bootstrap responsive designs the image that was previously centred now is left aligned.

as soon I remove img-responsive the image is centered again.
But img-responsive is needed to get the site responsive.

any suggestion?

@tobias-kuendig
Copy link
Member

What is img-responsive? What has it to do with this plugin? Maybe share some code or your configuration so it's easier to help you.

@Somel1978
Copy link
Author

Hi Tobias
img-responsive is a predefined class in bootstrap 3 that makes images responsive.
for reference is img-fluid in bootstrap 4.
This has been included as well on your plugin on the class atribute.
As some plugins that load images do not use this atributes and your plugin appends the class the idea was to use the plugin.
However even though it implements the class for some reason the images loose the center position and are left aligned.

image

@tobias-kuendig
Copy link
Member

The plugin usually just adds the class and does not change the alignment (unless you use the .focus() method). What is the resulting HTML after the plugin has processed an image? What is the assigned CSS?

@Somel1978
Copy link
Author

I will need to try to figure out where is the issue than.
I will keep you posted

@Somel1978
Copy link
Author

Somel1978 commented May 1, 2020

Ok This is what I´'ve done...

Blank page with just the image.

  • Image is centered but not resized

Blank page with just the image width .img-responsive manually added to this image css

  • image is centered and resized but slightly expands beyond viewport

Blank page with just the image width .img-responsive added by the plugin

  • image is left aligned but correctly resizing.

Not sure how to troubleshoot this anymore.

@tobias-kuendig
Copy link
Member

Can you share a link? It's hard to help you without seeing any code. There are probably many things on your page that could mess with the image.

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

2 participants