Try this for your CSS:
.center img {
display:block;
margin-left:auto;
margin-right:auto;
}
and then add to your image to center it:
class="center"
More Related Contents:
- How to design a table like this
- How to resize an external site to fit into an iframe?
- Element not located at bottom of viewport
- How to add some non-standard font to a website?
- Ignore whitespace in HTML [duplicate]
- How to center a button within a div?
- CSS background-image-opacity?
- Fixed Table Cell Width
- Why does margin-top work with inline-block but not with inline?
- :nth-child(even/odd) selector with class [duplicate]
- How to CSS: select element based on inner HTML [duplicate]
- left-right movement.. css only very generic
- Why does width apply to a button with display inline?
- Equalize the height of left and right div, prevent right div from going below left div
- Auto Resize Image in CSS FlexBox Layout and keeping Aspect Ratio?
- How can I create a wavy shape CSS?
- Is there a reason to use a instead of a:link or a:visited in my stylesheet?
- Generate scroll bar for overflow to the left
- How do I remove the horizontal scrollbar in a div?
- Change color of bootstrap navbar on hover link?
- Missalignment with inline-block (other elements pushed down)
- Why does “position: absolute; left: 0; right: 0; width: XYpx; margin: 0 auto” actually center?
- HTML not loading CSS
- Is there an equivalent of CSS max-width that works in HTML emails?
- How might I force a floating DIV to match the height of another floating DIV?
- Making part of a div transparent
- Curved lines using only HTML and/or CSS
- justify-content: space-between failing to align elements as expected
- center inside a with CSS
- How to get equal width of input and select fields