I’m working on developing this responsive WordPress site: http://www.allisoncassels.com/Test/ and having a problem with my media queries.
I coded the CSS for the following breakpoints:
/* Portrait Tablets */
@media only screen and (min-width: 768px) and (max-width: 959px)
/* Portrait Mobiles */
@media only screen and (max-width: 767px)
/* Landscape Mobiles */
@media only screen and (min-width: 480px) and (max-width: 767px)
On desktop, everything looks great. On my phone and tablet, some things are mobile and some things are still showing like the desktop (stuff I have display: none on is showing, div widths are off, etc.)
The only thing I can figure out is that it’s related to my phone/tablet being retina display, but I don’t see other sites having to factor that into their calculations…
Really baffled right now, I’ll appreciate any help. Thanks
Put this in your head!!! 😛
Inside the meta tag.
name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″ />
Cheers,
Mark
You should add this meta
Try this media query for iPhone 6/6 Plus and Apple Watch CSS media queries
iPhone 6 portrait
iPhone 6 Plus landscape
iPhone 6 Plus portrait
and (-webkit-min-device-pixel-ratio: 3)
{ }
iPhone 6 and 6 Plus
Apple Watch
For Image responsive
This wordpress theme Avando is already responsive:
you don’t need to create some additional css
Update
My web host’s server was crashing while I was working last night and I think that was affecting the files being properly propagated… All the responsive code works perfectly today.
Try adding a color css border around elements that are not displaying correctly,
border:thin red solid;
or change thebackground-color
to figure out if you css selector is being used. Also, it will be usefull if you put in links to the page and point out the elements you are having issues with and the device/device browser you are testing on.