It drives me crazy! I looked through a few questions in Stackoverflow and see that the ID element takes precedence over the class element (which is good to know, but I have the feeling that this is not my problem). This is my NAVIGATION menu that I am struggling with. (I use max-width btw)
Here is the GENERAL CSS for my NAV:
nav{ float:right; margin-left:2%;} nav ul{ float:left; list-style:none; width:100%;} nav ul li{ float:left; margin-left:5px; } nav a{ display:inline-block; float:left; color:#f0f0f0; text-transform:uppercase; font-family:TrumpGothicWestRegular; font-size:1.5em; padding: 100px 20px 20px 20px; }
Now that Viewport UNDER is 1140px, I want CSS to change the menu as follows:
nav ul li{ float:left;} nav a{ float:left; display:inline-block; padding: 20px 20px 20px 20px;}
Thus, the main menu will float to the left with a smaller upper indent.
When Viewport UNDER is 800px, I want CSS to change the menu as follows:
nav ul li{ float:none;} nav a{ float:none; padding: 20px 20px 20px 20px;}
As you can see, I just changed NAV Float to NONE
Now, when I test it, GENERAL CSS works fine, and also when the view port is under 1140px, but as soon as I go under 800px, NAV still floats to the left !! ?? Does it seem to inherit a 1140px CSS content request? Any ideas?
UPDATE: This is how I define my media queries
<link rel="stylesheet" media="only screen and (max-width: 800px), only screen and (max-device-width: 800px)" href="small-device800.css" /> <link rel="stylesheet" media="only screen and (max-width: 1140px), only screen and (max-device-width: 1140px)" href="small-device1140.css" />