I am currently experimenting with replicating a website design from a popular clothing brand to enhance my knowledge of HTML and CSS. I am curious to know if it is possible to modify the header content when the window size is reduced, either through CSS alone or if JavaScript will be required.
In full-screen mode, you can observe two distinct sections: category and support
However, in a minimized view, the header displays as: Download the app
After searching online without success, I have decided to seek answers here. Below is the code that I have been working with:
HTML
<!DOCTYPE html>
<html>
<head>
<title>The Souled Store</title>
<link rel="stylesheet" href="TSS Clone Header.css">
<link rel="stylesheet" href="TSS general.css">
</head>
<body>
<div class="first-header">
<div class="outfit-selection-by-gender">
<div class="women-section">
<button class="women">
WOMEN
</button>
</div>
<div class="men-section">
<button class="men">
MEN
</button>
</div>
<div class="kids-section">
<button class="kids">
KIDS
</button>
</div>
</div>
<div class="support-section">
<div class="order-tracking-section">
<button class="order-tracking-button">
TRACK ORDER
</button>
</div>
<div class="contact-us-section">
<button class="contact-us-button">
CONTACT US
</button>
</div>
<div class="app-download-section">
<button class="app-download-button">
DOWNLOAD APP
</button>
</div>
</div>
</div>
</body>
</html>
CSS
.first-header {
height: 45px;
padding-left: 25%;
padding-right: 25%;
padding-top: 0%;
padding-bottom: 0%;
background-color: rgb(237, 45, 47);
font-family: Arial, Helvetica, sans-serif;
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
column-gap:;
}
.outfit-selection-by-gender {
display: flex;
flex: 1;
justify-content: start;
}
.women {
display: flex;
flex: 1;
background-color: rgb(237, 45, 47);
color: white;
font-size: 14px;
font-weight: 900;
letter-spacing: 1px;
border-style: solid;
border-color: black;
border-width: 1.5px;
border-top: 0px;
border-bottom: 0px;
padding: 12px 20px 12px 20px;
}
.men {
display: flex;
flex: 1;
background-color: rgb(237, 45, 47);
color: white;
font-size: 14px;
font-weight: 900;
letter-spacing: 1px;
border-style: none;
padding: 12px 20px 12px 20px;
}
.kids {
display: flex;
flex: 1;
background-color: rgb(237, 45, 47);
color: white;
font-size: 14px;
font-weight: 900;
letter-spacing: 1px;
border-style: solid;
border-color: black;
border-width: 1.5px;
border-top: 0px;
border-bottom: 0px;
padding: 12px 20px 12px 20px;
}
.support-section {
display: flex;
justify-content: end;
}
.app-download-button {
padding-left: 15px;
border-style: none;
background-color: rgb(237, 45, 47);
color: white;
font-size: 13px;
}
.contact-us-button {
padding-left: 15px;
border-style: none;
background-color: rgb(237, 45, 47);
color: white;
font-size: 13px;
}
.order-tracking-button {
padding-left: 15px;
border-style: none;
background-color: rgb(237, 45, 47);
color: white;
font-size: 13px;
}