WordPress.org

Ready to get started?Download WordPress

Forums

Image Caption can't center! (6 posts)

  1. scooterschalk
    Member
    Posted 5 years ago #

    I ahve trouble in getting the caption under the images centered. There has been a lot written about this, and i have tried it all, adding lots of code in my stylesheet, yet no luck.

    I have changed swopped to the default theme, and found it all worked just good. So it is a theme issue [ misty Morning by refueled ]

    Yet after copy and paste the image code from the default stylesheet to the misty morning stylesheet, it still does not work?
    any ideas?

  2. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    copy and paste the image code from default stylesheet to the BOTTOM of the misty morning stylesheet so that it will override all other declarations applied before

  3. kcmartin
    Member
    Posted 5 years ago #

    Hi, I am having the same problem. My theme is "deviart" and I did copy the image code into the bottom of the deviart style sheet, but even though the caption text is centered in my editor it still is left aligned (or justified) once published. I cannot find the place where this is defined? And how to override it?

    This is my current image code in the stylesheet:

    (P.S. I know there is a shorter way to write the padding syntax but with that one I never remember which is which, so this is easier for playing around with it :)

    .aligncenter,
    div.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    .wp-caption {
    border: 1px solid #b1b18b;
    text-align: center;
    background-color: #f3f3f3;
    padding-top: 7px;
    padding-bottom: 0;
    padding-left: 10px;
    padding-right: 10px;
    margin: 13px;
    -moz-border-radius: 16px;
    -khtml-border-radius: 16px;
    -webkit-border-radius: 16px;
    border-radius: 16px;
    }

    .wp-caption img {
    margin: 0;
    padding-top: 10px;
    border: 0 none;
    }

    .wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 8px;
    padding-right: 8px;
    margin: 0;
    }

  4. shaneholden
    Member
    Posted 5 years ago #

    I'm also having problems with this. Any ideas?

  5. JL
    Member
    Posted 5 years ago #

    Me too. The css seems to say that the caption is centered but it's not. Anybody out there who can answer this?

  6. kcmartin
    Member
    Posted 5 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic