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.
I can't really explain it, but responsive design has completely stopped working. The site is still in development, so we've been adding modules over that last week. Are there any modules that are known to cause issues with these theme?
Comments
Comment #1
yevgeny.ananin CreditAttribution: yevgeny.ananin commentedModules that I've added over the last few days:
editablefields, entity, link, entityreference, fb, twitter, oauth, features, job_scheduler, feeds.
I've disabled them all and still responsive design is no longer working. When I open the site in a mobile browser, I see the desktop layout - where it used to be all one column. I'm very puzzled.
Comment #2
yevgeny.ananin CreditAttribution: yevgeny.ananin commentedUpdate
Well, one more weird thing is: if I reduce the size of the browser on my desktop to a small width (less than 480px), the responsive design does work as expected. However, the responsive design still doesn't work on any mobile browser that I check - I still get the desktop view where I have to pinch and zoom to see anything. Is there any reason it would stop working in mobile browsers but not in desktop browsers? Any help would be much appreciated.
Comment #3
yevgeny.ananin CreditAttribution: yevgeny.ananin commentedOk, I figured it out. Apparently mobile browsers assume that the "viewport" (also called "virtual window") of a website is the same as a desktop browser, unless the site specifies a different viewport in the viewport meta tag. A responsive design site usually needs the following:
<meta name="viewport" content="width=device-width" />
inside of the head tag.To implement this in a theme, you can use:
I'm not sure if this was originally implemented in the theme, and maybe I broke it some how by fudging with the html.tpl.php and/or the page.tpl.php files. Regardless, the above code fixed my problem!