• Resolved blitzzerg

    (@blitzzerg)


    Hello,

    I changed the line-height property (style.css) of gallery caption successfully, but now I want to edit the same property of the rest of images

    https://dl.dropboxusercontent.com/u/56394155/Captura32.JPG

    I tried editing .wp-caption class and .wp-caption-text (in style.css) but as you see in the image there is no change. I think its a problem with the <span> tag, is set to “line-height: 26px;” in style.css

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there, if you’re still having trouble with this, could you please provide a link to your site so I can take a look at the code directly? Thanks.

    Thread Starter blitzzerg

    (@blitzzerg)

    Well I edited the html manually, but I still have the problem.
    http://www.fundacionhabaneras.es

    Hi there, you’re right about span tag interference – in fact, you have two span tags applying 10px of line-height. Here’s what your code looks like:

    <p class="wp-caption-text">
    <span style="font-size: x-small; line-height: 10px;">
    <span style="font-family: 'book antiqua', palatino; line-height: 10px;">Plano de las zonas tabaqueras cubanas. Fuente de ambos grabados: La Agricultura viajera. Edición a cargo de Joaquín Fernández Pérez y Ignacio G. Cascón</span>
    </span>
    </p>

    Since line-height: 10px; is inline and closest to the caption, it’s overriding the 26px you’ve set in style.css.

    Do you want all your captions throughout the site to have these styles?

    font-family: 'book antiqua', palatino;
    line-height: 26px;
    font-size: x-small;

    If so, remove the two inline span tags and add this CSS to your stylesheet.

    Just a heads-up that if you didn’t make a child theme, please be careful to make a backup of your files when you update the theme, as all your changes will be overwritten. The best way to make changes to a theme is to use a child theme. Here are some guides in case you haven’t made one before:

    http://codex.ww.wp.xz.cn/Child_Themes
    http://op111.net/53/
    http://vimeo.com/49770088

    If your only changes are to the CSS and you haven’t touched the theme’s template files, you could alternatively use a custom CSS plugin, like the Custom CSS module in Jetpack.

    Thread Starter blitzzerg

    (@blitzzerg)

    Thank you, I would fix that

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Editing "line-height" caption’ is closed to new replies.