Safari ignoring css max-width media queries below a certain point
Turns out I was missing a squiggly brace, so I had code like the following:
@media screen and (max-width: 767px){
/* lots of css */
.some_selector { padding: 20px; /*<---- missing squiggly brace*/
/* more css */
}
@media screen and (max-width: 640px){
/* lots more css */
}
Inserting the missing brace caused Safari to begin working. Other browsers didn't choke on the error which is partially why it was so difficult to track down.
Thanks for the help everyone, I feel pretty silly now.
Chrome, Safari ignoring max-width in table
Max-width applies to block elements. <table>
is neither block nor inline. Ambiguous enough? haha. You can use display:block; max-width:1000px
and forget about width:100%
. Chrome and Safari follow the rules!
Edit May 2017: please note, this comment was made 7 years ago (in 2010!). I suspect browsers have changed a bunch over the years (I wouldn't know, I no longer do web design). I recommend using a more recent solution.
Safari and media query for mobile
In your stylesheet, main.css, the first 2 media queries are each missing their closing curly-brace. This is causing them to nest and be misinterpreted by Safari. In the formatted CSS:
- after line 980 add, }
- and after line 1227 add, }
Related Topics
Bootstrap 4 Responsive Button Size
CSS Transition Does Not Work on Top Property in Ff
CSS Perfect Full Screen Image Background
Emojis Won't Scale Beyond 16Px Font-Size on iOS 7
How to Add CSS Files to a Custom Module in Odoo
Changing the Scrollbars' Style
Maintain CSS Styling When Converting HTML to PDF in ASP.NET
Curved Plane Surface in CSS3 or Three.Js
How to Make a Fluid Sticky Footer
Selector for One Tag Directly Followed by Another Tag
Combine Calc() with Attr() in CSS
Show/Hide Div Based on Browser Size Using Only CSS
Structuring CSS (Sass, Less) Files by Elements, by Function and by Media Queries: 3D Code Structure
I Need a Max-Margin CSS Property, But It Doesn't Exist. How Could I Fake It
CSS Rotation with Respect to a Reference Point
How to Align About the Colon in Each Line of Text Like Movie Credits Often Do