grizzarkhov
Member
Posted 2 years ago #
The images I'm inserting into this theme are set to CENTER alignment. But when posts are published they're aren't centered. I checked the code and the wordpress css is intact:
.aligncenter {
display: block;
margin-left: auto;
margin-right: auto
}
But it doesn't seem to be applying itself correctly to the div that the image is in <div id=attachment_6">. I think the issue is that this div isn't as wide as the content area. I can't find css for attachment_6.
Help!
without a link to your site, there is not much advice to give.
is there a class="wp-caption aligncenter" in the code as well?
you may need to add a style to style.css for:
.wp-caption.aligncenter {display: block;
margin-left: auto;
margin-right: auto
}
(also .wp-caption.alignleft {} and .wp-caption.alignright {} )
grizzarkhov
Member
Posted 2 years ago #
OMG! Life saver! Thank you. That was near making me crazy. *sigh*
amomsrantings
Member
Posted 1 year ago #
Okay, i've searched the forums and nothing i've seen so far works for my blog. Word press is so different from blogger. I am new to word press and to css so please be patient. I can not get images to center now either. Tell me what i'm doing wrong. Let me know any other info you need and i'll post it.
see example here http://www.amomsrantings.com/posts/wholly-guacamole/
amomsrantings, you need to add this to your styles.css
.aligncenter, div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
I use:
.aligncenter {
margin: 0 auto;
display: block;
}
intenseblog
Member
Posted 1 year ago #
I use this for my website at intenseblog:
.aligncenter, div.aligncenter {
display: block!important;
margin: 20px auto;
}