Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
any way to center the captions for when viewing gallery images? mine align left
thx/
chris
Comment | File | Size | Author |
---|---|---|---|
#4 | captionscreenshot.png | 385.37 KB | glitz |
Comments
Comment #1
dbeall CreditAttribution: dbeall commentedyep, there sure is..
add this to either your theme's css or node_gallery/node_galley.css
.node-node_gallery-image{text-align: center;}
edit::
it might be good to add the 'p' tag
.node-node_gallery-image p{text-align: center;}
Comment #2
dddave CreditAttribution: dddave commentedNote: If your theme supports a local.css file you should use it to make your changes there. By doing so you won't loose your changes when you upgrade.
Comment #3
dbeall CreditAttribution: dbeall commentedthanks dddave, I always forget to bring that up.
I have a 'bad habit' of modifying files inside the sites/all/modules/[module-name] directory.
Comment #4
glitz CreditAttribution: glitz commentedawesome thanks! although, i just tried adding .node-node_gallery-image p{text-align: center;} and i added in my themes (zero point) custom.css, as well as node_gallery/node_galley.css.
i have refreshed my browser, as well as cleared drupal's cache, although it still appears aligned to the left. (screenshot attached)
im not sure, maybe my theme is overriding this function. If Im not able to get it centered, its no big deal.
Thanks!!
Comment #5
dbeall CreditAttribution: dbeall commenteddid you add it to the 'bottom' of the css file?
since css is 'cascading' it needs to be at the bottom so it will override everything above it.
I did test the css declaration on windows xp and wamp server, but I was using the Garland theme.
edit::
If it still won't work, I will install your theme and re-test it till we get it working. leave a note....
Comment #6
glitz CreditAttribution: glitz commentedHi,
yup, i added it to the bottom of the .css file, in both locations. (the themes custom.css file, as well as node-gallery.css). I have not tried adding it yet to the themes core css file, although that was not recommended.
Thanks,
Chris
Comment #7
dbeall CreditAttribution: dbeall commentedHi Chris, do you have a website URL that I can look at..
Comment #8
glitz CreditAttribution: glitz commentedsorry for the delay in response. yes I do, I can not access the url though from my current location but I will send it to you asap.
thanks
Comment #9
dddave CreditAttribution: dddave commentedSetting to fixed due to the age of this issue.