Reputation: 2028
I need to center a logo above a content box, with center alignment.
At present, I use the following code:
#logo img {
margin: -12em 0 4em 17em;
}
Although this works on computers, it breaks on mobile phones. See screenshot.
How can I get the functionality I desire on both platforms? I tried margin: 0px auto;
to no avail.
URL: http://ec2-174-129-169-80.compute-1.amazonaws.com/
Upvotes: 0
Views: 113
Reputation: 160
Remove float: left from #logo and then go to #logo img and add:
#logo img{
margin-left: auto;
margin-right: auto;
}
Upvotes: 0
Reputation:
You want the image centered? Then why is #logo
set to float: left;
in layout.css line 89?
Upvotes: 2