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.

<div class="skull"><img src="../../../../Logos/NewsFlash.jpg" width="200" height="275" alt="News Flash" longdesc="../../../../Logos/NewsFlash.jpg" /></div>

Open in new window


.skull {
	display: block;
    margin: 0 auto;
}

Open in new window


www.audiodigz.com

It's the News Flash Skull.  Thank you.
DS928Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DS928Author Commented:
This worked.
.skull {
	width:85%;
	margin-left:auto;
	margin-right:auto;
}
.skull, img {
	display: block;
    margin: 0 auto;
}

Open in new window

Pawan KumarDatabase ExpertCommented:
try use this css for Image..

Imgd 
{
    display: block;
    margin-left: auto;
    margin-right: auto 
}

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DS928Author Commented:
It worked, but it also affected the other image under featured.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

DS928Author Commented:
Nope.  The image completely disappeared.
Pawan KumarDatabase ExpertCommented:
Glad that it worked.

Did u use that css on the other images also ? If yes do not use that css for other images.
DS928Author Commented:
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>

Open in new window


.skull {
	padding-top:25px;
	width:85%;
	margin-left:auto;
	margin-right:auto;
}
.skull, newsflash {
	display: block;
    margin: 0 auto;
}

Open in new window

DS928Author Commented:
Changed the class in the css to:

.newsflash {
	display: block;
    margin: 0 auto;
}

Open in new window


and it worked.  Thank you for your help.
DS928Author Commented:
Although not the answer it sent me on my way to finding a correct solution.  Thank you.
Pawan KumarDatabase ExpertCommented:
Use this --

.skull, newsflash 
{
	display: block;
    margin: 0 auto;
}

Open in new window

Pawan KumarDatabase ExpertCommented:
Ohh glad you got it. You beat me :) . Cheers
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.