The following code when run in the Chrome Browser on Linux OS. does not implement the row direction until the width reaches 1200px (whereas the set break point is 600px)
@media screen and (min-width: 600px) {
.container {
flex-direction: row;
}
}
I have checked all my code, there’s nothing except what you’ve written.
This is my index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="..." /> <title>My First Web Page</title> <link rel="stylesheet" href="css/normalize.css" /> <link rel="stylesheet" href="css/styles.css" /> <style></style> </head> <body> <div class="container"> <div class="box"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur, mollitia velit quaerat placeat veniam nostrum expedita eligendi ab ut odio voluptatum dolorum ex cupiditate quasi corporis sit harum! Animi, impedit. </p> </div> <div class="box"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur, mollitia velit quaerat placeat veniam nostrum expedita eligendi ab ut odio voluptatum dolorum ex cupiditate quasi corporis sit harum! Animi, impedit. </p> </div> </div> </body> </html>
CSS Code:
.container {
display: flex;
flex-direction: column;
}.box { background: gold; padding: 1rem; } .box:nth-of-type(2) { background: dodgerblue; } @media screen and (min-width: 600px) { .container { flex-direction: row; } }
I have also tried restarting the Live Server, but nothing happened.
Please Help me in resolving this issue.