My current project involves working with media queries and I am encountering some issues specifically on Android cellphones.
You can find the URL at:
Ideally, the web page's banner should be centered at the top with gold letters on a black background, while the overall background color should be parchment beige.
The media queries function perfectly on iPod Touch devices in both 'portrait' and 'landscape' orientations, but there seems to be an issue on Safari browser when viewed on Android phones in 'portrait' mode.
Unfortunately, the style sheets defined in the queries do not seem to apply on Android smartphones, regardless of whether it is in portrait or landscape orientation. The root cause of this problem seems related to the meta viewport declaration in the header section.
I would greatly appreciate it if those using cellphones could visit the test page mentioned above and provide feedback on whether the style sheet attributes are correctly displayed in both portrait and landscape views.
I have attempted:
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" media="only screen and (max-width: 480px)" type = "text/css"href="mobilestory.css" />
<link rel="stylesheet" media="only screen and (min-width: 481px)" type = "text/css" href="aaastory.css" />
Additionally:
<link rel="stylesheet" media="only screen and (max-width: 480px) and (orientation : landscape)" type = "text/css"href="mobilestory.css" />
And:
<link rel="stylesheet" media="only screen and (max-width: 480px) and (orientation : portrait)" type = "text/css"href="mobilestory.css" />
I have also modified the meta tag to:
<meta name="viewport" content="initial-scale=1">