This might be an obvious question so I apologize for my lack of experience on this–I’m trying to create my first digital exhibit in Omeka and I’m currently playing around with positioning of images and what it looks like on the public page and I notice that the Gallery option doesn’t allow you to center the photos within the gallery, it only gives an option for Left or Right.
Is there an easy fix for this if I’d like them to be positioned closer to the center of the page? Right now for one page where I’m trying to feature 6 original dollhouse rooms (I’ve done it so that it’s a gallery of 3 images on top and 3 below since including all of them in one gallery makes it look even worse): When Mrs. Fisher started constructing the miniature rooms: The Original Six Rooms · Welcome to the Dollhouse: A Closer Look at the History behind Mrs. Mignonette Fisher's Dollhouse collection at Eugene Shedden Farley Library · Wilkes University Institutional Repository
If anyone has any suggestions, please let me know!
The reason here is just that the gallery is written/styled to have 4 items across in each row when there’s no “showcase” item or text being floated against. The left and right settings are just about how to align the gallery against the text component if there is one, which is also why there’s no center choice. The gallery position setting doesn’t actually get used at all if you don’t have either the showcase enabled or some text entered for the block: the assumption is just that it’s taking up the entire width.
The simplest thing to do to fix this is to add a left margin to the first entry to the gallery with CSS. The following will do that only for galleries with exactly 3 things in them:
.exhibit-gallery-item:first-child:nth-last-child(3) {
margin-left: 12.5%;
}
You could add that to your theme’s css/style.css file.
Hi @suzanna.calev ,
I just wanted to add an alternate solution.
Instead of modifying the theme’s CSS, you could instead use the CSSEditor plugin
I would also probably lean toward something like the CSS below, which will center the items regardless of how many you have.
#content .exhibit-items, #content .gallery {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
If you keep the 2 galleries like you have, the 3 items in each gallery will be centered. If you put more than 4 items in a gallery, you’ll get 4 items in the first row and the second row will be centered. In your case, the last 2 would be centered like this:
Thank you and J Flatnes for your help! I initially thought it wasn’t working but I just cleared my cache/cookies and now I see the gallery is centered.
I really appreciate both of your help with this!
Thank you so much J Flatnes and Fackrellj for your help! I initially thought it wasn’t working when the code was updated but I just cleared my cache/cookies and now I see the gallery is centered.
I really appreciate you both for helping me with this!!