Centering images php
- by peak
I'm trying to center an image in php. I'm currently using this line of code
echo '<img src="newimage.jpg" width="110" height="120" class="centre">';
However, this seems to have no effect. I've also tried using something like this,
img.center {
display: block;
margin-left: auto;
margin-right: auto;
}
<img src="newimage.jpg" alt="Suni" class="center" />
but this merely gives me a syntax error, how do I go about fixing this?
Thanks