Support » Themes and Templates » Trying to add padding to gallery images

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try this: > dt:nth-child(1) {
    padding-left: 5%;
    padding-right: 5%;

    This is the same thing as above: > dt:nth-child(1) {
    padding: 0 5% 0 5%;

    I’m not familiar with the theme you are using but you might also need to look at the size of the images. The padding won’t really be noticeable if the images have a set size. I assume you want the images to be closer together but not scrunched up in the middle of the page? It’s hard to lessen the space between them if the size is being constrained somewhere else.

    What I mean is I would like each picture to have a nice little border around it to show it off, just as photos appear in the gallery page of a Twenty Twelve theme, but in the rather simpler Misty Lake theme that I have chosen. I’d like them to have a 5% padding of white around them and then the gray 2 pix border around that.

    Sorry I wasn’t clear and thank you for answering!

    If you want to add a border around them then you need to add a border style. Since it’s the same element try: > dt:nth-child(1) {
    border: 5% solid #ccc;

    I’m not sure if using the percent for the border will work very well but you can try it with pixels if it doesn’t work.

    Thanks for the suggestions; tried both what you pasted and with pixels; still not getting the results to appear. (Also tried things I found on a CSS tutorial. I think what I was calling padding I should have been referring to as margins for the photos – between the photo and the border.) But my problem may be in not having the right name for the id. I don’t know… I’m at a loss.

    I’m going to try submitting this request for help properly under its theme name and see if someone familiar with the theme might be able to help.

    Anyway, thanks thinking with me about this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trying to add padding to gallery images’ is closed to new replies.