0
I’m trying to make the box2 get float:left and box1 with float:right but even setting the options HTML does not play what I need. This needs to happen without using grid or flexbox or anything other than basic css3 and html... I’m a beginner and need this foundation to continue learning responsiveness with legacy code...
@charset "utf-8";
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
main {
width: 100vw;
}
.container {
float: left;
width: 100%;
height: auto;
padding: .5%;
background-color: sienna;
}
.box1 {
float: right;
width: 100%;
height: 200px;
background-color: wheat;
}
.box2 {
float: left;
width: 100%;
height: 200px;
background-color: rgb(145, 247, 208);
}
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Teste 1 - Responsividade com media queries </title>
<link rel="stylesheet" href="styleMobile_v1.css">
</head>
<body>
<main>
<div class="box-noticia">
<div class="container">
<div class="box1"></div>
<div class="box2"></div>
</div>
</div>
</main>
</body>
</html>
Could you reduce your code to a [example]? It’s easier to analyze only what went wrong than having to filter everything in your non-problem-related code.
– fernandosavio
Done Sorry I still can’t communicate right here...
– vi figueiredo