I have a HTML code as:
<!DOCTYPE html>
<html lang="en">
<head>
<title>test page</title>
<style>
.hint {width:510px;}
@media only screen and (max-device-width: 720px) {
.hint {width:280px}
}
@media only screen and (max-device-width: 720px) and (orientation: landscape){
.hint {width:350px}
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<div class="hint">just a test
<script>alert($(window).width()); alert($('.hint').css('width'));</script>
</div>
</body>
</html>
It works fine on all iOS devices but behaves weird for some Android devices like Samsung Galaxy Note 4 as I can reproduce the issue.
For the default browser, it works fine. The alert result is 980px and 280px but for some browsers like UC browser, it's 510px.
Is there anything wrong with my media query code?
Thanks for any kind of tips!