[SOLVED] Centring images with CSS?
The title sort of says it all, but this is really confusing me. I go into the the Style Images section and add:
Code:
margin-left: auto; -Dapizz |
how were the two images added to the posts?
what HTML is involved in the two images? What surrounds them? |
For margin auto to work in centering the element being centered needs a width supplied. I am not sure how you would go about centering all images. That is generally done when you add an image you just select center as the alignment.
|
Quote:
1) Using the image adder at the top of the post 'kitchen'. HTML wise, just an IMG tag and an SRC. 2) The same. Like mentioned above. 3) if you mean HTML, there's no centre tag around either. I checked but did notice that written inside the IMG tag there was: Code:
class="size-full wp-image-13 aligncenter" Code:
img { size: full; align: center; } |
Quote:
Both images do have width and height specified in the HTML. I did, however, notice that only the second image was linked in an A tag if this would make any difference. Thanks, :) |
The images weren't added teh same way because one is just an <img> (with the class 'aligncenter' in a <p> while the other is an <img> (with NO class assigned) in a <a> in a <p>
add 'class="aligncenter"' to the second image |
OK, thanks. Just wondering if there was an easy way. Lucky I only have a few images on my blog. I'll have to remember for the the future. :) Thanks for all the help though.
|
All times are GMT -6. The time now is 01:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.