I am trying to position my logo at the very top and center of my web site. I am able to get it centered from left to right. The problem is I have about a several pixel space between the top of the image and the top of the web page. I would like to close up this space. I think the problem is to do with a margin around the image. I have tried several margin properties(margin-top: 0;) with out any luck. Below is what I am using. Thanks for any suggestions.

img.head {
display: block;
margin-left: auto;
margin-right: auto;}

Why doesn't the following seem to make any difference? You would think that would get rid of the margin above the image.

margin-top: 0

If I set margin: 0 as a body attribute it fixed it.

there may be padding or margin in container element,
just post the css of container of image.
if no container then post css of body.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.