precious-forever
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 10px added to width in image captions?Ok, that explains it perfectly! Thanks a lot.
@greyisgood: width: auto!important; for .wp-caption worked for me. Sorry for bothering.
Forum: Fixing WordPress
In reply to: 10px added to width in image captions?Ok, but I still don’t understand why WP adds these 10px.
Forum: Fixing WordPress
In reply to: 10px added to width in image captions?I don’t get you. I do think this is a WP specific topic, not a general CSS thing. Did you read my last posting?
Forum: Fixing WordPress
In reply to: 10px added to width in image captions?So where would you put “width: auto;”?
The thing is that the new caption feature writes something like that:
[caption id="attachment_XY" align="alignright" width="100" caption="This is a caption"]<img src="example.com/image.jpg" alt="This is a caption" title="XYZ" width="100" height="100" class="size-full wp-image-XY" />[/caption]Note that the first width (that goes into the div in the output) is the same as the width of the image in the editor. But as soon as you post it, 10px are automatically added to the width of the div (so in the example above, the div would be 110px wide, although the image is only 100px).
Forum: Themes and Templates
In reply to: Changing caption styleTalk to the div for the image+caption like this (in your theme’s “style.css”):
.wp-caption{ ... }And the p for the caption line is here:
.wp-caption p.wp-caption-text { ... }Also make sure to have the following in your stylesheet for the alignment to work correctly:
.alignleft { float: left; } .alignright { float: right; }Oh, and here is a more detailed thread on the topic 😉
http://wordpress.org/support/topic/189152?replies=4Forum: Fixing WordPress
In reply to: 10px added to width in image captions?I second that 😉
I’m currently subtracting 10px in the caption tag, but that also feels just like a weird workaround.