flammy / imagebox

This dokuwiki plugin displays captions in a box drawn around an image.
https://www.dokuwiki.org/plugin:imagebox
GNU General Public License v2.0
5 stars 7 forks source link

center aligned images always floating to the left #110

Closed Grandma-Betty closed 1 year ago

Grandma-Betty commented 5 years ago

Using the following code, the image is always floating to the left when the image needs to be set in the middle of the page: [{{ :getting_started:tutorials:haltest1.png?300 | //Control system of the test program// }}] Edit: Using PHP 7.3 in case this information matters.

pabsilva commented 4 years ago

I have noticed this issue as well.

DokuWiki version: Release 2018-04-22b "Greebo" PHP version: 7.3.5

I recently migrated from an rather old dokuwiki version (created around 2010) and back then I was already using this plugin (or at least one with the same name), so I noticed the difference.

Grandma-Betty commented 4 years ago

Still not fixed with version 2019-10-13.

Schroeffu commented 4 years ago

Same here, still not fixed?

alajovic commented 3 years ago

I made an attempt to fix this in my setup, and it seems to have succeeded. I did the following modification to style.css:

--- a/style.css
+++ b/style.css
@@ -2,7 +2,7 @@ div.thumb2 {
 margin-bottom:.5em;
 padding-right:10px;
 width:auto;
-display:table-cell
+display:block
 }

 div.trien {

Please try it out and let me know if it breaks something. If it turns out to work for others as well, I'll make a PR with this change.

TZJinzo commented 3 years ago

Correct, this issue still exists.

alajovic commented 3 years ago

@TZJinzo have you tried my patch above? Did it work?

TZJinzo commented 3 years ago

Thank you so much for this. Indeed this has fixed the problem for it seems. This plugin was unusable before because you can't centre images and it made workflow impossible for my team wiki. See results below as example. For people who are less experienced at Doku, the style.css file to be modified is here: /public_html/lib/plugins/imagebox/style.css

image

alajovic commented 3 years ago

Okay, let's just go forward with a PR, then. There are at least two confirmed cases where my patch helped, and nobody screamed about any breakage yet, so... ship iiit! :D

TZJinzo commented 3 years ago

Thank you so much for this! This plugin helps a huge amount for many people and this fix finally allows it to be fully functional. Sorry as an aside, will this work fully with the rename page plugin?

urapadmin commented 3 years ago

yes, thanks a bunch. This solved the issue for me, too. And I cannot see any unfortunate side-effects, so far.

flammy commented 1 year ago

thank you for your contributions, your pr is merged.