I've added a margin to the top of the blue section below, but it doesn't seem to be displaying correctly. Additionally, it appears to be right up against the left side of the screen. Any suggestions on how to address this?
The issue arises when CSS Sheet 2 is applied.
https://i.sstatic.net/hOBr4.png
HTML Code:
<html>
<header>
<title>My Website</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="stylesheet" type="text/css" href="responsive.css"
media="screen and (max-width:900px)">
</header>
<body>
<div class="m1">
<p>My content</p>
</div>
<div class="m2">
<p>My content</p>
</div>
<div class="m3">
<p>My content</p>
</div>
</body>
CSS Sheet 1
body {
width:1000px;
margin:20px auto;
max-width:100vw;
}
.m1 {
background-color:red;
width:30%;
height:500px;
float:left;
margin: 0 2.5% 0 2.5%;
}
.m2 {
background-color:yellow;
width:30%;
height:500px;
float:left;
margin-right:2.5%;
}
.m3 {
background-color:blue;
width:30%;
height:500px;
float:left;
margin-right:2.5%;
}
CSS Sheet 2
body {
}
.m1 {
width:42.5%;
}
.m2 {
width:42.5%;
}
.m3 {
clear:both;
float:none;
width:85%;
margin:20px 0 0 0;
}