We’re with you. JoomShaper is offering a 20% Discount on all plans due to the impact of COVID-19.

Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

image margin in feature box not working if margin right is empty/no value

Featured Lock Resolved Bug
Hi there,

I just recognised the bug as described in the title.

If I set a margin for example only top and bottom, this margin does not work, if margin right is kept empty. If I write 0px for right margin, margin top and bottom work again, but not if margin right is left blank.

Maybe you can fix this because I am sure other people will have problems with that.
I just found out by chance.

15 Answers

Pavel

More than a month ago #Permalink
Or you can accurately center the image via css.
Adjust the margins at the top and bottom.
2.jpg
Then, using browser code Inspector, locate the class that is responsible for this and write code.
22.jpg

3.jpg

Attachments (3)

  • 2.jpg
    2.jpg 122.4 KB
  • 22.jpg
    22.jpg 256.4 KB
  • 3.jpg
    3.jpg 160.9 KB

Mehtaz Afsana Borsha - Staff

More than a month ago #Permalink
HI,
Could you please share your site URL? So that I can check and also give a screenshot of your problem
-Best Regards
Mehtaz

Pavel

More than a month ago #Permalink
If I set a margin for example only top and bottom, this margin does not work, if margin right is kept empty. If I write 0px for right margin, margin top and bottom work again, but not if margin right is left blank.


This is expected behavior. If you use at least one value, all other fields should not be empty. Set 0 in other fields.

Susanne

More than a month ago #Permalink
Site is under development on localhost so no url yet.
But I attached some pictures.


Problem is I want to have the image centred. So that is why I do not want to type a margin left and right. How can I set this image to centred?

Attachments (4)

  • Auswahl_073.png
    Auswahl_073.png 49.2 KB
  • Auswahl_074.png
    Auswahl_074.png 73.2 KB
  • Auswahl_075.png
    Auswahl_075.png 73.8 KB
  • Auswahl_076.png
    Auswahl_076.png 50.5 KB

Susanne

More than a month ago #Permalink
This is expected behavior. If you use at least one value, all other fields should not be empty. Set 0 in other fields.


But it works if I leave the left margin empty. As you see in the pictures. So if this is expected, it is not consistent and I guess people will stumble on that. So maybe you can fix this somehow by making it possible to leave empty or write in the explanation that if one value is filled, all values have to be filled. That would be quite helpful.

And now the question: how can I set this image to be centred?

I already tried this, but it did not work.
https://www.joomshaper.com/forums/can-image-not-the-icon-in-the-feature-box-addon-be-centered

Susanne

More than a month ago #Permalink
And thanks both of you for your quick answer.

Pavel

More than a month ago #Permalink
So that is why I do not want to type a margin left and right. How can I set this image to centred?


Type it "auto"

Mehtaz Afsana Borsha - Staff

More than a month ago #Permalink
HI,
As your site now in localhost then you have to check it own. You can set the margin:auto
You can follow this blog I hope it will help you
https://www.joomshaper.com/blog/which-line-of-css-i-have-to-edit-code-inspector-in-action
Thank you

Susanne

More than a month ago #Permalink
Sorry, but "auto" does not work.

Attachments (2)

  • Auswahl_077.png
    Auswahl_077.png 64.2 KB
  • Auswahl_078.png
    Auswahl_078.png 50 KB

Mehtaz Afsana Borsha - Staff

More than a month ago #Permalink
Actually without URL its difficult for me to solve this.

Susanne

More than a month ago #Permalink
Yes, why is "auto" not working?

Is it maybe possible to solve it via screen sharing (skype, webex, e.g.) or something?

Pavel

More than a month ago #Permalink
Yes, why is "auto" not working?

Is it maybe possible to solve it via screen sharing (skype, webex, e.g.) or something?

I understood your problem. You have set the overall alignment of the content to the left.
In this case, to set the image in the center, it is necessary pick up the value approximately. It is easier to do in the frontend editor.
In my case, it looks like this.
In px
1.jpg
Or in %
11.jpg
And I repeat. If you use at least one value, all other fields must be filled. This applies to any of these fields in all addons, sections and columns.

Attachments (2)

  • 1.jpg
    1.jpg 109.7 KB
  • 11.jpg
    11.jpg 124.4 KB

Susanne

More than a month ago #Permalink
That worked now, thank you very much!

Pavel

More than a month ago #Permalink
You are wellcome :)


There are no replies made for this post yet.
Be one of the first to reply to this post!

124

Templates

331402

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us