I'm using media queries but the styles keep overwriting each other, is there anything I can do to stop that?
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video
{
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
font-family:Verdana,Geneva,sans-serif;
}
*{
margin: 0;
padding: 0;
}
body
{
background-color: #e9ebee;
}
.mainNav
{
width:100%;
background-color: #ffffff;
overflow: hidden;
border-bottom:1px solid #9a9696;
position: fixed;
left: 0px;
top: 0;
z-index: 100;
}
ul
{
list-style-type:none;
}
input[type=text], input[type=password]
{
border:1px solid #000000;
padding: 3px;
}
input:focus
{
outline:none;
border-color:#9ecaed;
box-shadow:0 0 10px #9ecaed;
}
.leftNav h2 a
{
text-decoration: none;
color: #000000;
}
input[type=submit]
{
background-color:#6ea8da;
color: #fff;
cursor:pointer;
outline: none;
}
input[type=submit]:hover
{
background-color:#6e85da;
}
.mainControl
{
background-color: #ffffff;
height:100%;
position: absolute;
z-index: 10;
overflow: hidden;
display: none;
}
.menuList
{
font-weight: bold;
}
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (max-width: 320px)
{
.leftNav
{
min-width: 60%;
float: left;
}
.leftNav h2
{
margin: 20px;
}
.rightNav
{
display: none;
}
.hamIcon
{
font-size: 30px;
float: left;
margin: 10px;
color: #000000;
}
.mainControl
{
max-width:30%;
overflow:hidden;
}
.spacing > li
{
padding:10px;
border-bottom:1px solid #8a8888;
}
.mainwrapper
{
width:90%;
margin-top: 30px;
background-color: #ffffff;
margin-left: auto;
margin-right:auto;
height: auto;
overflow: hidden;
}
.containIndex
{
width: 100%;
}
.imgwrapper
{
width: 100%;
height: 20%;
margin: 20px;
overflow: hidden;
float:left;
}
.imgplace img
{
width: 87%;
height: 200px;
overflow: hidden;
}
.meaning
{
width: 100%;
margin: 7px;
text-align: center;
}
.textHolder
{
text-align: center;
width: 86%;
padding: 5px;
}
}
@media only screen and (min-width: 321px) and (max-width: 479px)
{
.leftNav
{
min-width: 50%;
float: left;
}
.leftNav h2
{
margin: 20px;
}
.rightNav
{
display: none;
}
.hamIcon
{
font-size: 30px;
float: left;
margin: 10px;
color: #000000;
}
.mainControl
{
max-width:30%;
overflow:hidden;
height:100vh;
position: fixed;
}
.spacing > li
{
padding:10px;
border-bottom:1px solid #8a8888;
}
.mainwrapper
{
width:90%;
margin-top: 30px;
background-color: #ffffff;
margin-left: auto;
margin-right:auto;
height: auto;
overflow: hidden;
}
.containIndex
{
width: 100%;
}
.imgwrapper
{
width: 100%;
height: 20%;
margin: 20px;
overflow: hidden;
float:left;
}
.imgplace img
{
width: 87%;
height: 200px;
overflow: hidden;
}
.meaning
{
width: 100%;
margin: 7px;
text-align: center;
}
.textHolder
{
text-align: center;
width: 86%;
padding: 5px;
}
}
/* Extra Small Devices, Phones */
@media only screen and (min-width: 480px)
{
}
/* Small Devices, Tablets */
@media only screen and (min-width: 768px)
{
.leftNav
{
min-width: 60%;
float: left;
}
.leftNav h2
{
margin: 20px;
font-size: 43px;
}
.rightNav
{
display: none;
}
.hamIcon
{
font-size: 50px;
float: left;
margin: 10px;
color: #000000;
}
.mainControl
{
max-width:30%;
overflow:hidden;
height:100%;
}
.spacing > li
{
padding:10px;
border-bottom:1px solid #8a8888;
}
.mainwrapper
{
width:90%;
margin-top: 30px;
background-color: #ffffff;
margin-left: auto;
margin-right:auto;
height: auto;
overflow: hidden;
}
.containIndex
{
width: 100%;
}
.imgwrapper
{
width: 100%;
height: 20%;
margin: 20px;
overflow: hidden;
float:left;
}
.imgplace img
{
width: 95%;
height: 380px;
overflow: hidden;
margin-left: auto;
margin-right: auto;
}
.meaning
{
width: 97%;
margin: 7px;
text-align: center;
font-size: 40px;
}
.textHolder
{
text-align: center;
width: 92%;
padding: 5px;
font-size: 30px;
}
}
/* Medium Devices, Desktops */
@media only screen and (min-width: 992px)
{
}
/* Large Devices, Wide Screens */
@media only screen and (min-width: 1200px)
{
.hamIcon
{
float:left;
cursor: pointer;
}
.hamIcon:hover
{
color:#c6ced9;
}
.leftNav
{
min-width: 50%;
float: left;
}
.leftNav h2
{
margin: 20px;
}
.rightNav
{
min-width: 50%;
float: left;
}
.innerRightNav
{
margin: 20px;
float: right;
}
.formControl
{
float:left;
margin-left: 10px;
}
.hamIcon
{
font-size: 30px;
margin: 10px;
}
.mainControl
{
max-width:17%;
overflow:hidden;
}
.spacing > li
{
margin-bottom: 20px;
padding:10px;
border-bottom:1px solid #8a8888;
}
.mainwrapper
{
width:70%;
margin-top: 30px;
background-color: #ffffff;
margin-left: auto;
margin-right:auto;
height: auto;
overflow: hidden;
}
.containIndex
{
width: 99%;
margin-left: auto;
margin-right: auto;
}
.imgwrapper
{
width: 20%;
height: 20%;
margin: 20px;
overflow: hidden;
float:left;
}
.imgplace img
{
width: 100%;
height: 150px;
overflow: hidden;
}
.meaning
{
width: 100%;
margin: 7px;
text-align: center;
}
.textHolder
{
text-align: center;
}
/*register style*/
.registerHeading
{
width:100%;
text-align: center;
}
}