Does Chrome,Firefox,etc specify max-device-width to mobile?
For better view port size , their standard and uses take a look at bellow links
"sizes for various devices"
for other trends look here
and yes do remember to include
<meta name="viewport" content="width=device-width, initial-scale=1">
How to fix css errors for min-device-width and max-device-width
No need to use "min-device-width"
@media only screen and (min-width: 375px) and (max-width: 667px) {
body {
font-size: 9.5pt;
}
div.content {
width: 96ex;
margin: 0;
}
}
@media only screen and (min-width: 1200px) {
body {
font-size: 10pt;
margin: 0 4em;
}
div.content {
width: 96ex;
margin: 0;
}
}
How to simulate device-width and orientation in browser to test media queries?
Mobile device emulation is available as a built-in feature for Chrome, currently in the Beta channel. You need to enable it in the DevTools settings.
Media Queries not working properly to change the width
the min-width
works if range is outside that specified px
value and max-width
works for that specified range.
I think it is because you are setting width:60%
for both device size.
and you are using max-width:45px
property on .calculator
class so need to change that property in media query and if you want width of your calculator to fit the width of the display size you can remove that property of max-width
.
You should try:
works when size of display is in range of 320px and change width according to your need
@media screen and (max-width: 320px){
.calculator {
max-width: 60%;
}
}
works when size of display is greater than of 320px and change width according to your need
@media screen and(max-width: 320px) {
.calculator {
max-width: 60%;
}
}
Related Topics
Twitter Bootstrap Button Click to Toggle Expand/Collapse Text Section Above Button
Youtube API Not Working with iPad/Iphone/Non-Flash Device
Meteor: Tracker.Autorun/Observechanges & Collections Not Working as Expected
Displaying a Div Only on Tumblr Blog Homepage
Window.Scrollto Not Working in Phonegap - Alternative Solution or Workaround
How to Grab the CSS Truncated Text via Jquery
Bootstrap - Datetimepicker Add Custom Button Like Today
Get Actual Value Specified in CSS Using Jquery
Uncaught Typeerror: Cannot Set Property 'Onclick' of Null
Adding a Background Video with React
Divs Fixed and Unfixed Toggle Between Two Absolute Divs
Using 'Order' Property to Position Flex Item Between Siblings
How to Detect Which CSS Grid Column and Row an Element Is in Using JavaScript
Tinymce Customize "File" Menubar
Fixing Sub-Pixel Rounding Issue in a CSS Fluid Grid