Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

viewport device width, not working

I set up

meta name="viewport" content="width=device-width"

so that when on a mobile device, the site http://www.myscholly.com/iphone.php will adapt. I also make my containing div width=100%. This works when viewing in a normal web browser with a small viewport (i.e. shrinking the browser window), but it doesn't work on my iphone simulator.

I know the issue is CSS, but I disabled margins, paddings, and basically stripped everything but still have the issue. If you look at the site on mobile, the containing element does not have a width of 100%!

like image 600
Elijah Murray Avatar asked Jun 10 '26 01:06

Elijah Murray


1 Answers

In your style.css and in the html the div 'container' is a class = .container but in your max-width media query in the HTML file you're targeting it as a id = #container.

like image 97
Stuart Robson Avatar answered Jun 11 '26 22:06

Stuart Robson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!