I'm having a problem with my HTML. I've searched all over the internet, but still no real answer.
I have a website with some images, and I want them to be in the middle. Now, on my screen they're in the middle, but that's because I've put them there by moving them to one side. When my friends to look at it, the image is off-center.
Here's the website; if you are on a 13.5" screen it will look to be in the middle.
This question is related to
html
css
centering
text-align
<div style='width:200px;margin:0 auto;> sometext or image tag</div>
this works horizontally
In your specific case, you can set the containing a
element to be:
a {
display: block;
text-align: center;
}
Try something like this...
<div id="wrapper" style="width:100%; text-align:center">
<img id="yourimage"/>
</div>
Source: Stackoverflow.com