DS928
asked on
Image Not Centering
I have an image in a div. I am trying to get it to center. First do I need the div? Second I know about the block / image but I have different images on the page that I don't want affected.
www.audiodigz.com
It's the News Flash Skull. Thank you.
<div class="skull"><img src="../../../../Logos/NewsFlash.jpg" width="200" height="275" alt="News Flash" longdesc="../../../../Logos/NewsFlash.jpg" /></div>
.skull {
display: block;
margin: 0 auto;
}
www.audiodigz.com
It's the News Flash Skull. Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It worked, but it also affected the other image under featured.
ASKER
Nope. The image completely disappeared.
Glad that it worked.
Did u use that css on the other images also ? If yes do not use that css for other images.
Did u use that css on the other images also ? If yes do not use that css for other images.
ASKER
This does not work either
<div class="skull"><img src="../../../../Logos/NewsFlash.jpg" width="200" height="275" alt="News Flash" longdesc="../../../../Logos/NewsFlash.jpg" /class="newsflash"></div>
.skull {
padding-top:25px;
width:85%;
margin-left:auto;
margin-right:auto;
}
.skull, newsflash {
display: block;
margin: 0 auto;
}
ASKER
Changed the class in the css to:
and it worked. Thank you for your help.
.newsflash {
display: block;
margin: 0 auto;
}
and it worked. Thank you for your help.
ASKER
Although not the answer it sent me on my way to finding a correct solution. Thank you.
Use this --
.skull, newsflash
{
display: block;
margin: 0 auto;
}
Ohh glad you got it. You beat me :) . Cheers
ASKER
Open in new window