samedi 18 avril 2015

Media queries PX vs EM vs REM

Can anyone explain why my media queries break when converting them FROM px TO ems


In the body of my document, I have included the following rule font-size: 62.5%, Therefore I would assume that I could convert my media query to FROM 650px to 65em? Changing my media queries to ems breaks the layout


As an alternative, can I convert the media query to REMS with a pixel fallback ?? that said, I have no idea how to do this



@media screen and (min-width: 650px) {

body
{
font-size: 62%;
background-color: #364759;
background-repeat: repeat-x;
background: url("bg.gif");
}

#wrapper,
footer
{
width: 80%;
max-width: 1050px;
margin: 0 auto;
}
} // end media query


many thanks, P


Aucun commentaire:

Enregistrer un commentaire