I am trying to horizontally center an image that is contained within an anchor tag. I have tried setting it as a block and setting margins to auto with no luck. I have tried wrapping it in a div tag and doing the same, still, no luck. Even tried centering the img within the div within the div. I looked at other posts, and nothing seems to help. The image is still aligned to the left no matter what I do.
<h1 id="slideHeading">This is a Header</h1>
<img src="./images/Slides/cheeseBoards.jpg" name="slide" id="slideImg"/></a></div>
border: 1px solid green;
border: 1px solid blue;
border:1px solid red;
Make sure there is no float:left inherited from parents. margin:0 auto; does not work when you have float:left; or position:absolute;