How do I put pictures side by side in wordpress but with captions underneath each one.
I found that I could use the tag to put pictures next to each other but adding captions开发者_Python百科 keeps messing this up. The caption part looks like this:
[caption id="" align="" width="" caption=""] [/caption]
Can someone help with this?
(Small sub-question, what are square brackets in HTML?)
You just have to upload two+ images, then add captions, and insert them aligned left. Then, if your theme is coded correctly, they will float left and line up side by side with the captions underneath them (if they are not too wide to fit in the content area).
If it's still not working try adding this to your theme's stylesheet, or modify it to suit your needs:
.alignleft {
display:inline !important;
float:left !important;
margin:0 30px 15px 0 !important;
}
Sub-question answer: square brackets don't mean anything in HTML. This is an internal WordPress convention for a shortcode. WordPress filters out these brackets server side and replaces them with HTML.
精彩评论