So i am currently trying to make a responsive footer and and i am wondering how to deemed a website/component is responsive or not, while i do know that relative value needs to be used and @media query is a must to change the layout of the website. here are my questions,
How many media query to make? is 3 enough? >1024px for screen, >768 for tablet, and <768 for phone?
here are my code currently, i am open to suggestions as i am currently still learning but mainly i wanted to know whether this is responsive enough in developer eyes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Footer Watch</title>
<link rel="stylesheet" href="Test.css" />
</head>
<body>
<footer class="footer">
<div class="footer-section">
<div class="footer-subscribe">
<!-- TODO: Make it 2 Line, Responsive? -->
<h1>Ready To Meet The Future?</h1>
<div class="footer-subscription">
<input
class="footer-email"
type="email"
placeholder="Email Address"
/>
<button class="footer-subscribe-button" onclick="ClickSubscribe()">
Submit
</button>
</div>
</div>
<div class="footer-nav">
<div class="footer-link">
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Product</a>
<a href="#">Contact Us</a>
</div>
<div class="footer-contact">
<a href="#">Insta</a>
<a href="#">Twitt</a>
<a href="#">Wa</a>
<a href="#">Fb</a>
</div>
</div>
</div>
<div class="footer-copyright">
<hr />
<span>Copyright By Watches</span>
</div>
</footer>
<!-- TODO: Create JS -->
<script>
function ClickSubscribe() {
alert("Button clicked!");
}
</script>
</body>
</html>
CSS
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
height: 100vh;
color: #0e100f;
display: flex;
justify-content: center;
align-items: flex-end;
}
.footer {
width: 100%;
background-color: #e7e7e7;
padding: 40px 10% 40px;
}
.footer a {
text-decoration: none;
color: black;
}
.footer h1 {
margin: 0px;
font-size: 56px;
}
.footer-section {
display: flex;
justify-content: space-between;
}
.footer-subscribe {
flex: 1;
margin-right: 10px;
gap: 3rem;
border-right: 2px solid;
}
.footer-subscription {
display: flex;
margin-right: 3rem;
margin-top: 1rem;
}
.footer-email {
width: 60%;
padding: 1rem;
margin-right: 3rem;
border: none;
border-radius: 36px;
box-sizing: border-box;
outline: none;
}
.footer-subscribe-button {
background-color: red;
color: white;
border: none;
padding: 0px 2rem;
font-size: 16px;
}
.footer-nav {
flex: 1;
display: flex;
}
.footer-link {
display: flex;
flex: 1;
flex-direction: column;
justify-content: space-between;
margin-right: 10px;
border-right: 2px solid;
}
.footer-contact {
display: flex;
flex: 1;
flex-direction: column;
flex-wrap: wrap;
justify-content: space-between;
}
.footer-copyright {
margin: 40px 0px;
font-size: 12px;
font-weight: bold;
}
.footer-copyright hr {
border-top: 2.5px solid black;
}
@media (max-width: 768px) {
.footer h1 {
font-size: 36px;
}
.footer-subscribe {
margin-right: 20px;
border-right: 1px solid;
}
.footer-subscription {
flex-direction: column;
}
.footer-email {
width: 100%;
margin: 0 0 1rem 0;
}
.footer-subscribe-button {
width: 100%;
padding: 1rem;
}
.footer-nav {
flex-direction: row;
}
.footer-link {
border-right: 1px solid;
margin-right: 20px;
}
}
David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.