Good morning, afternoon or evening everybody.
I’m working through the HTML/CSS courses at the moment and have just reached the end of the Tea Cozy project and was hoping I might be able to garner some feedback from the community.
I’m not entirely happy with it, but fundamentally it looks more or less like it should. I haven’t played around with adding media queries to make the page particularly responsive yet, but that’s the next step.
Things I know are wrong/could be improved:
1 - There is a bit of div soup going on, I really should use named elements more rather than using divs for everything.
2 - On these smaller projects I tend to use classes and IDs kind of at random rather than actually thinking about which is more appropriate.
Any feedback you can give would be greatly appreciated
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="style.css" rel="stylesheet" type="text/css">
<title>Tea Cozy</title>
</head>
<body>
<!-- Header -->
<div class="header">
<img src="https://content.codecademy.com/courses/freelance-1/unit-4/img-tea-cozy-logo.png" alt="Tea Cozy Logo" class="logo">
<ul class="nav">
<a href="#mission"><li>Mission</li></a>
<a href="#featured"><li>Featured Tea</li></a>
<a href="#locations"><li>Locations</li></a>
</ul>
</div>
<!-- Mission -->
<div class="mission">
<div id="mission-image">
<div id="mission-text">
<h2>Our Mission</h2>
<h4>Handpicked, Artisinally Curated, Free Range, Sustainable, Small Batch, Fair Trade, Organic Tea</h4>
</div>
</div>
</div>
<!-- Products -->
<div class="features">
<h2>Tea of the Month</h2>
<h4>What's Steeping at The Tea Cozy?</h4>
</div>
<div class="tea-container">
<div class="tea">
<img src="https://content.codecademy.com/courses/freelance-1/unit-4/img-berryblitz.jpg" alt="Berry Tea">
<h4>Fall Berry Blitz Tea</h4>
</div>
<div class="tea">
<img src="https://content.codecademy.com/courses/freelance-1/unit-4/img-spiced-rum.jpg" alt="Wooden Tea Box">
<h4>Spiced Rum Tea</h4>
</div>
<div class="tea">
<img src="https://content.codecademy.com/courses/freelance-1/unit-4/img-donut.jpg" alt="Doughnut">
<h4>Seasonal Donuts</h4>
</div>
<div class="tea">
<img src="https://content.codecademy.com/courses/freelance-1/unit-4/img-bedford-bizarre.jpg" alt="Tea and Sugar">
<h4>Myrtle Ave Tea</h4>
</div>
<div class="tea">
<img src="https://content.codecademy.com/courses/freelance-1/unit-4/img-myrtle-ave.jpg" alt="Tea in Mug">
<h4>Bedford Bizarre Tea</h4>
</div>
</div>
<!-- Locations -->
<div id="locations">
<div id="location-image">
<div id="location-header">
<h2>Locations</h2>
</div>
<div class="location-container">
<div class="location-box">
<h3>Downtown</h3>
<p>384 West 4th St</p>
<p>Suite 108</p>
<p>Portland, Maine</p>
</div>
<div class="location-box">
<h3>East Bayside</h3>
<p>3433 Phisherman's Avenue</p>
<p>(Northwest Corner)</p>
<p>Portland, Maine</p>
</div>
<div class="location-box">
<h3>Oakdale</h3>
<p>515 Crescent Avenue</p>
<p>Second Floor</p>
<p>Portland, Maine</p>
</div>
</div>
</div>
</div>
<!-- Contact -->
<div id="contact">
<h2>The Tea Cozy</h2>
<h5>[email protected]</h5>
<h5>917-555-8904</h5>
</div>
<!-- Footer -->
<footer>
<h5>copyright The Tea Cozy 2017</h5>
</footer>
</body>
body {
font-family: Helvetica;
font-size: 22px;
color: seashell;
background-color: black;
opacity: 0.9;
text-align: center;
}
.header {
width: 100%;
height: 69px;
position: fixed;
background-color: black;
display: block;
top: 0px;
border-bottom: 1px solid seashell;
}
.logo {
height: 50px;
float: left;
padding-left: 10px;
padding-top: 9px;
}
.nav {
display: flex;
float: right;
align-items: center;
padding: 0 1.875rem;
}
.nav a {
color: seashell;
}
.nav li {
list-style: none;
padding-left: 2rem;
}
.mission {
height: 700px;
width: 100%;
}
#mission-image {
background-image: url("https://content.codecademy.com/courses/freelance-1/unit-4/img-mission-background.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
max-width: 90%;
height: 100%;
margin: 40px auto;
display: flex;
}
#mission-text {
margin: auto;
background-color: black;
width: 100%;
}
.features {
margin-top: 80px;
}
.tea-container {
display: inline-flex;
max-width: 1000px;
height: auto;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
.tea img {
height: 200px;
width: 300px;
padding: 10px 10px;
}
#location-image {
background-image: url("https://content.codecademy.com/courses/freelance-1/unit-4/img-locations-background.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
max-width: 90%;
height: 500px;
margin: 40px auto auto auto;
padding-top: 90px;
}
.location-container {
max-width: 1050px;
margin: 15px auto auto auto;
display: flex;
justify-content: space-between;
}
.location-box {
opacity: 1;
height: 300px;
width: 300px;
padding: 20px;
box-sizing: border-box;
background-color: black;
flex-basis: 30%;
margin-bottom: auto;
}
#contact {
height: 200px;
width: 100%;
}
footer {
display: block;
float: left;
padding-left: 20px;
}