Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Used this theme for a very basic event website. On mobile (Nexus 5) the site just scales to the screen size, but the media queries do not kick in.
To solve this I added this to the html.tpl.php
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Is this a good solution or should I do something else? It works for me...
Comments
Comment #2
loparr CreditAttribution: loparr commentedHi, same here. This fixes the problem.
Comment #3
ruhanstander CreditAttribution: ruhanstander commentedThere is an error in the template.php file.
Line 97 refers to the incorrect theme (medical):
function medical_page_alter($page) {
Replace line 97 with:
function parallax_zymphonies_theme_page_alter($page) {
Replace line 104 content with:
'content' => 'width=device-width, initial-scale=1.0, maximum-scale=1'
Or add this code to template.php in your sub-theme:
(replace theme with the sub-theme name)
Comment #4
HansKuiters CreditAttribution: HansKuiters commentedThis is better! Thanks.
Comment #5
wavesailor CreditAttribution: wavesailor as a volunteer commentedThanks @ruhanstander - Works perfectly
Comment #6
zymphonies-dev CreditAttribution: zymphonies-dev at Zymphonies commentedUpdated changes in latest release.