2
I would like to know what I am doing wrong, I want when the user enters my site by mobile, change some dimensions of my page, background and other things that I will change..
@media screen and (max-width: 480px){
div#container {
background-color: red;
margin: 2% 0 2% 0;
}
}
#container {
background-color: silver;
margin: 2% 12% 2% 12%;
padding: 2% 5% 2% 5%;
color: #252525;
}
<!DOCTYPE html>
<html lang="PT-BR">
<head>
<title></title>
<link rel="stylesheet" href="_css/estilo.css"/>
<meta charset="UTF-8"/>
</head>
<body>
<div id="container">
<p> aqui eu tenho alguns parágrafos no meu site..</p>
<p>porém visto pelo celular fica muito pequeno ou as margens ficam muito grande, queria que se tornasse responsivo</p>
</div>
</body>
</html>
Note: I’ve looked at other topics related here on the site but in practice I could not, so I decided to post. I thank you already!
Good morning! Since the solution presented by Alexandre did not work. Make sure there is no css of greater importance overwriting yours. Test part of your code by placing the ! Import.
– Maurício Nunes
I recommend using the framework bootstrap
– Renato Junior