i guess you defined this css rules
.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
it is overwritten by other css rules. comign fro ai1ec.
so if you add !important to margin parts, i guess it will do the trick. like:
` margin-left: auto!important;
margin-right: auto!important;`
Hello @hahawebdesign,
You can just set your aligncenter display block to inline-block and it will automatically center you image. Then no need to set important in any of your code. But if you NOT set inline block to your class you may use auto margin and set it important what was said in the previous command.
You can use below code.
.aligncenter{
clear:both;
display:inline-block;
}
or below code
.aligncenter{
clear:both;
display:inline-block;
margin:auto !important;
}
or you can use what was said in the previous code. Both of our code will work.
Thanks
-
This reply was modified 8 years, 8 months ago by
ThemesGrove.
-
This reply was modified 8 years, 8 months ago by
ThemesGrove.
use this css
img.aligncenter {
margin: 0 auto !important;
display: table;
}