I'm having trouble making my under construction html layout responsive for screens with a size of 400px and below. The images and container don't stretch to 100% width as I want them to.
The container currently has a fixed width of 400px, so the max-width property is not behaving as expected.
FULL HTML
<!DOCTYPE html >
<html>
<head>
<title>some title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body {
font-family: 'Arial', serif;
width: 100%;
height: 100%;
}
.container {
padding: 10px;
text-align: center;
margin: 0 auto;
max-width: 400px;
}
.container img {
margin: 50px 0;
display: inline-block;
width: 100%;
height: auto;
}
p {
font-size: 16px;
}
a {
color: red;
}
</style>
</head>
<body>
<div class="container">
<img src="https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider2.jpg">
<h1>some text</h1>
<p>bla bla bla some text </p>
<img src="https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider2.jpg">
</div>
</body>
</html>
body {
font-family: 'Arial', serif;
width: 100%;
height: 100%;
}
.container {
padding: 10px;
text-align: center;
margin: 0 auto;
max-width: 400px;
}
.container img {
margin: 50px 0;
display: inline-block;
width: 100%;
height: auto;
}
p {
font-size: 16px;
}
a {
color: red;
}
<div class="container">
<img src="https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider2.jpg">
<h1>some text</h1>
<p>bla bla bla some text </p>
<img src="https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider2.jpg">
</div>