As a complete beginner in HTML and CSS, I have a question that may seem silly. Recently, I created this HTML code:
* {
margin: 0px;
padding: 0;
box-sizing: border-box;
}
p {
font-size: 14px;
font-family: 'Work Sans', 'sans serif';
font-weight: 500;
color: hsl(224, 23%, 55%);
text-align: center;
margin-top: 20px;
}
.button {
font-size: 15px;
font-weight: 700;
border: none;
font-family: 'Work Sans', 'sans serif';
padding-top: 13px;
padding-bottom: 13px;
display: flex;
align-items: center;
justify-content: center;
color: white;
background-color: hsl(245, 75%, 52%);
border-radius: 10px;
cursor: pointer;
margin-top: 30px;
width: 75%;
height: 6%;
align-self: center;
white-space: nowrap;
}
a {
font-size: 15px;
font-weight: 700;
color: hsl(223, 47%, 23%);
font-family: 'Work Sans', 'sans serif';
text-decoration-style: underline;
}
body {
background-image: url(images/pattern-background-desktop.svg);
background-position-y: -270px;
background-repeat: no-repeat;
background-size: cover;
background-color: hsl(225, 100%, 94%);
}
.container {
display: flex;
flex-direction: column;
flex-wrap: wrap;
width: 23%;
height: 80vh;
margin-right: auto;
margin-left: auto;
margin-top: 60px;
margin-bottom: 60px;
border-radius: 25px;
background-color: white;
}
.illustration-hero {
width: 100%;
height: 30%;
justify-content: flex-start;
background-image: url(images/illustration-hero.svg);
background-repeat: no-repeat;
background-size: contain;
background-position: center center;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
/* margin-bottom:210px; */
}
@media screen and (max-width:377px) {
.illustration-hero {
width: 100%;
height: 30%;
justify-content: flex-start;
background-image: url(images/illustration-hero.svg);
background-repeat: no-repeat;
background-size: contain;
background-position: center center;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
}
body {
background-image: url(images/pattern-background-mobile.svg);
}
.container {
width: 80%;
display: flex;
flex-direction: column;
}
}
.order {
margin-top: 40px;
font-weight: 900;
font-size: 25px;
font-family: 'Work Sans', 'sans serif';
color: hsl(223, 47%, 23%);
font-style: bold;
align-self: center;
}
.info {
min-height: 15%;
width: 80%;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
/* border:1px solid black; */
background-color: hsl(225, 100%, 98%);
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
.info img {
margin-top: 15px;
margin-bottom: 15px;
margin-left: 5px;
}
.plan {
height: 100%;
}
.plan ul {
list-style-type: none;
margin-left: 20px;
align-self: center;
margin-top: 20px;
font-family: 'Work Sans', 'sans serif';
font-weight: 900;
}
.price {
font-family: 'Work Sans', 'sans serif';
font-weight: 500;
color: hsl(0, 0%, 67%);
}
.change {
margin-left: 140px;
margin-top: -25px;
}
<div class="container">
<div class="illustration-hero"></div>
<div class="order">Order Summary</div>
<p>You can now listen to millions of songs,<br> audiobooks, and podcasts on any device <br> anywhere you like!
</p>
<div class="info">
<img class="icon-music" src="images/icon-music.svg" alt="Icon Music">
<div class="plan">
<ul>
<li>Annual Plan</li>
<li></li>
<span class="price">$59.99/year</span>
</ul>
<div class="change">
<a href="#">Change</a>
</div>
</div>
</div>
<button class="button">Proceed to Payment</button>
However, when viewed at a width of 375px, such as an iPhone X, the element with the class .illustration-hero (the blue rectangular image) does not display the border radius or flex-start alignment.
I attempted to replicate the desktop version attributes for .illustration-hero within the media query but saw no changes.
The issue remains: why does .illustration-hero not show the border-radius or flex-start alignment in the iPhone X version?