I’ve attached a single image (consisting of three side-by-side images) for use here as an example.
This image displays successfully on a desktop screen, but only shows the dog on an iphone screen.
Is there a way to have the image resize so that the full image (three images across) appears on all screen sizes?
Here’s my code:
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
'''' '''' '''' " " " "
<style>
/* For device width smaller than 400px: */
body {
background-repeat: no-repeat;
background-image: url('../images/example.png');
}
/* For device width 400px and larger: */
@media only screen and (min-device-width: 400px) {
body {
background-image: url('../images/example.png');
}
}
</style>
<style>
.middle-box {
top-margin: 5px;
padding: 10px 0;
height: auto;
max-width: 100%;
display: flex;
flex-wrap: wrap;
color: #ffffff;
background: transparent url(../images/example.png) no-repeat;
}
" " " "
</head>
<body>
" " " "
<div class="middle-box">
<div class="container text-center">
<p>text text text</p>
</div>
</div>
" " " " "
</body>
" " "