#22906 closed enhancement (wontfix)
Captions should be responsive
| Reported by: | maxwell.shim | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 3.5 |
| Severity: | trivial | Keywords: | |
| Cc: | Focuses: |
Description (last modified by )
Problem 1 : Does not resize image with caption for a responsive design.
Returns the fixed width of the image function img_caption_shortcode()
So does not change the image width.
I think change style max-width.
return '<div ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="max-width: ' . (10 + (int) $width) . 'px">'
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Modifying
img_caption_shortcode()isn't necessary.The same effect can be achieved by adding
max-width: 100%;to.wp-captionin your theme's stylesheet. In fact, the Twenty Twelve theme does it this way, see [21407].Sorta Related: #10409