wordpress caption injects css code (2 posts)

  1. Dunkkan
    Posted 7 years ago #

    Hi guys,

    I'm dealing with the code that automatically is injected into the html always there's a caption.

    <div class="wp-caption alignnone" style="width: 438px">

    I'd like to overwrite it, or avoid its appearence, but I don't know how.

    I tried :

    div .wp-caption{

    But still nothing. Neither working only with the class .wp-caption...
    I can control the image is inside but not the caption itself, which eventually appears smaller than the image, so the text that follows gets wrapped too soon.

    Did anyone solved that ?


  2. Dunkkan
    Posted 7 years ago #

    Ok, sorry.

    the 'p' tag which defines the text is under control now (I had some extra padding).

    If you need to make smaller the whole caption (because if your original images are huge the caption will break all), just use the max-width, to the div:

    div .wp-caption{

Topic Closed

This topic has been closed to new replies.

About this Topic