• Resolved xxatti

    (@xxatti)


    I’m trying to center my caption titles for image thumbnails on my blog. I’m trying to do this through the code in the actual post that contains the image. This is it the code I have right now [caption id="attachment_57" align="alignleft" width="150" caption="dar2"]<a href="http://xxarublog.com/wp-content/uploads/2009/04/dar2-2.jpg"><img class="size-thumbnail wp-image-57" title="dar2" src="http://xxarublog.com/wp-content/uploads/2009/04/dar2-2-150x150.jpg" alt="dar2" width="150" height="150" /></a>[/caption]

    I’m sure it’s something simple, but I’m just missing it. Any help would be great.

Viewing 7 replies - 1 through 7 (of 7 total)
  • have you got a link to your site so i could have a look to understand it better?

    have you tried [caption id="attachment_57" align="center" width="150" caption="dar2"]<a href="http://xxarublog.com/wp-content/uploads/2009/04/dar2-2.jpg"><img class="size-thumbnail wp-image-57" title="dar2" src="http://xxarublog.com/wp-content/uploads/2009/04/dar2-2-150x150.jpg" alt="dar2" width="150" height="150" /></a>[/caption]

    Thread Starter xxatti

    (@xxatti)

    I tried the align=”center” in place of “alignleft” and that works if there’s only 1 pic, but where there’s more than one pic in the post it throws it off.

    I just took the caption off cause it was even giving me problems not letting me wrap the text around it. But if anyone can solve these two issues I’d like to put the captions back.

    Site is http://xxarublog.com

    in your style.css look for

    post .content .wp-caption p {
    margin:0;
    }

    and replace it with this

    post .content .wp-caption p {
    margin:0;
    text-align:center;
    }

    Thread Starter xxatti

    (@xxatti)

    Yes… thanks liamg. That worked. Now I just need to get the images to be centered inside the captions. By chance can you help with this?

    in style.css look for

    element.style {
    width:310px;
    }

    and replace with

    element.style {
    text-align:center;
    width:310px;
    }

    and that is an awesome blog idea haha, hope it goes well!

    Thread Starter xxatti

    (@xxatti)

    haha… Thanks. However, I’m still having no luck with centering the pics. It appears I don’t have element.style in my css. Perhaps a difference in my theme?

    Thread Starter xxatti

    (@xxatti)

    Problem solved! I added this code to the style.css

    .wp-caption img {
    	margin-left:5px;
    	padding: 0;
    	border: 0 none;
    }
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘How to center thumbnail caption title’ is closed to new replies.