954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem centering a logo

I have an image and i want to center it with

margin: 0 auto;

but it doesn't work so how can i center it in the top of the page ?

a.emara47
Newbie Poster
9 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

Put it in a div, give the div a width, and centre the div.

drjohn
Posting Pro in Training
448 posts since Mar 2010
Reputation Points: 76
Solved Threads: 80
 
Put it in a div, give the div a width, and centre the div.


I did what you said but it didn't work !!!!

........

and in css

#header {
width: 551px;
margin:0 auto;
}

a.emara47
Newbie Poster
9 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

Seemed to work for me, try fiddling with the width:

http://jsfiddle.net/6UFX7/1226/

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

Seemed to work for me, try fiddling with the width:

http://jsfiddle.net/6UFX7/1226/


Well, thank you i will try this site. It seems good

a.emara47
Newbie Poster
9 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: