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?
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

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

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

Open in new window

0

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.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

DS928Author Commented:
Nope.  The image completely disappeared.
0
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.
0
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

0
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.
0
DS928Author Commented:
Although not the answer it sent me on my way to finding a correct solution.  Thank you.
0
Pawan KumarDatabase ExpertCommented:
Use this --

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

Open in new window

0
Pawan KumarDatabase ExpertCommented:
Ohh glad you got it. You beat me :) . Cheers
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.