Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 102 additions & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
@@ -1 +1,102 @@
/* Add custom css styles here */
/* CSS for Flexbox Layout */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

header {
position: relative; /* Relative positioning for the header */
height: 50vh; /* Full viewport height (adjust as needed) */
display: flex;
flex-direction: column; /* Stack items vertically */
align-items: center; /* Center horizontally */
justify-content: center; /* Center vertically */
overflow: hidden;
text-align: center; /* Center text horizontally */
}

header img {
width: 100%;
height: auto; /* Maintain aspect ratio */
object-fit: cover; /* Ensure image covers the area */
position: absolute; /* Position image behind text */
top: 0;
left: 0;
z-index: -1; /* Move image behind text */
}

header h1, header p {
color: black; /* Ensure text color is visible */
margin: 0.5rem 0; /* Add space around text */

}

.text-box{
background-color: rgba(255, 255, 255, 0.6); /* White with 60% opacity */
z-index: -1; /* Ensure it stays behind the text */
border-radius: 10px;
width: 300px; /* Adjust width as needed */
height: 150px; /* Adjust height as needed */
padding: 20px;
}

.cookies {
display: flex;
flex-wrap: wrap;
gap: 16px; /* Adjust space between items as needed */
}

.cookies-item img {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 50%; /* Circular shape */
}

.img-box {
display: flex;
justify-content: center; /* Center the image horizontally */
margin: 20px 0; /* Optional: Add margin to space the image from surrounding content */
}

/* Make the image inside the img-box smaller */
.img-box img {
width: 150px; /* Adjust width as needed */
height: auto; /* Maintain aspect ratio */
object-fit: cover; /* Ensure the image fits well */
}


footer {
background-color: rgb(75, 121, 183);
text-align: center;
padding-top: 2em;
padding-bottom: 2em;
}

.about-us {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin: 40px 0;
padding: 20px;
}

.about-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}

.about-us h2 {
margin-bottom: 20px;
font-size: 2rem;
}

.about-text {
max-width: 600px;
line-height: 1.6;
}
46 changes: 33 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,67 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cookie Store</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="css/styles.css" />

</head>
<body>
<header>
<img src="images/coffee-biscuits.jpg">
<div class="text-box">
<h1>Cookie Store</h1>
<p>Buy our awesome cookies. All proceeds go to charity!</p>
</div>

</header>

<main>
<h2>Our Cookies</h2>
<p>Checkout our latest and delicious cookies.</p>

<div class="cookies">
<div class="cookies-item">
<h3>Mint Chocolate</h3>
<p>Tasty mint chocolate cookies</p>
<img src="images/mint-cookie.png" alt="A single mint chocolate cookie" />
</div>

<div class="cookies-item">
<h3>Peanut Butter</h3>
<p>Yummy peanut buttery goodness</p>
<img src="images/peanut-cookie.png" alt="A single peanut butter cookie" />
</div>

<div class="cookies-item">
<h3>Oatmeal</h3>
<p>Your fitness instructors favorite</p>
<img src="images/oatmeal-cookie.png" alt="A single oatmeal cookie" />
</div>

<div class="cookies-item">
<h3>Chocolate Chip</h3>
<p>Gooey chocolate you'll love</p>
<img src="images/chip-cookie.png" alt="A single chocolate chip cookie" />
</div>
</div>
</main>
<div>
<h2>About us</h2>

<img src="images/bakers.svg" alt="illustrations of two people baking" />
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
<div class="about-us">
<h2>About Us</h2>
<div class="about-content">
<div class="img-box">
<img src="images/bakers.svg" alt="Illustrations of two people baking" />
</div>
<div class="about-text">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
</div>
</div>
</div>

<footer>
<h2>Contact us</h2>
<div>
Expand Down