• 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{
    		width:500px;
    		}

    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 ?

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter dunkkan

    (@dunkkan)

    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{
    		max-width:500px;
    		}

Viewing 1 replies (of 1 total)
  • The topic ‘wordpress caption injects css code’ is closed to new replies.