I am using a css media query to detect portrait mode on a iPad and apply a centring style to a div with fixed or absolute positioning, I have tried both to no avail. The query is working but the div won't centre in portrait mode. It will centre perfectly fine in landscape.
you can view the site live at http://goodmorningmoon.ca pass: springy88
Here is my code
@media only screen and (max-device-width: 1024px) and (orientation:portrait) {
#logo{ position:absolute; left:50%; width:160px; margin-left:80px;}
}
Thanks! in advance.
I was missing the -negative symbol oops
@media only screen and (max-device-width: 1024px) and (orientation:portrait) {
#logo{position:absolute; width:160px; margin-left:-80px; left:50%; }
}