Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
solve the linter
  • Loading branch information
tajulafreen committed Dec 22, 2024
commit cde2b3ba223661114cd691c7b2c2adfec471d55f
287 changes: 143 additions & 144 deletions Source-Code/E-CommerceWebsite/style.css
Original file line number Diff line number Diff line change
@@ -1,145 +1,144 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}

header {
background-color: #333;
color: #fff;
padding: 10px 20px;
text-align: center;
}

.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}

#cart-btn {
background-color: #28a745;
color: white;
border: none;
padding: 10px 20px;
font-size: 1rem;
cursor: pointer;
border-radius: 5px;
}

#cart-btn:hover {
background-color: #218838;
}

.container {
margin: 50px auto;
padding: 20px;
background: #fff;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
max-width: 1000px;
}

h1 {
margin-bottom: 30px;
}

.products-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
}

.product {
border: 1px solid #ddd;
border-radius: 10px;
padding: 10px;
text-align: center;
background-color: #fff;
}

.product img {
max-width: 100%;
height: 300px;
border-radius: 10px;
}

.product .title {
font-size: 1.1rem;
font-weight: bold;
margin: 10px 0;
height: 60px;
overflow: hidden;
}

.product .price {
font-size: 1rem;
color: #333;
margin: 10px 0;
}

.product button {
background-color: #007bff;
color: white;
border: none;
padding: 10px;
font-size: 1rem;
cursor: pointer;
border-radius: 5px;
width: 100%;
}

.product button:hover {
background-color: #0056b3;
}

/* Cart Modal Styles */
.cart-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: none;
justify-content: center;
align-items: center;
z-index: 1000;
}

.cart-content {
background-color: white;
padding: 20px;
border-radius: 10px;
max-width: 500px;
width: 100%;
text-align: left;
}

#cart-items {
list-style-type: none;
padding: 0;
}

#cart-items li {
display: flex;
justify-content: space-between;
padding: 5px 0;
}

#close-cart {
margin-top: 20px;
background-color: #dc3545;
color: white;
border: none;
padding: 10px;
font-size: 1rem;
cursor: pointer;
border-radius: 5px;
}

#close-cart:hover {
background-color: #c82333;
}

font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}

header {
background-color: #333;
color: #fff;
padding: 10px 20px;
text-align: center;
}

.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}

#cart-btn {
background-color: #28a745;
color: white;
border: none;
padding: 10px 20px;
font-size: 1rem;
cursor: pointer;
border-radius: 5px;
}

#cart-btn:hover {
background-color: #218838;
}

.container {
margin: 50px auto;
padding: 20px;
background: #fff;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
max-width: 1000px;
}

h1 {
margin-bottom: 30px;
}

.products-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
}

.product {
border: 1px solid #ddd;
border-radius: 10px;
padding: 10px;
text-align: center;
background-color: #fff;
}

.product img {
max-width: 100%;
height: 300px;
border-radius: 10px;
}

.product .title {
font-size: 1.1rem;
font-weight: bold;
margin: 10px 0;
height: 60px;
overflow: hidden;
}

.product .price {
font-size: 1rem;
color: #333;
margin: 10px 0;
}

.product button {
background-color: #007bff;
color: white;
border: none;
padding: 10px;
font-size: 1rem;
cursor: pointer;
border-radius: 5px;
width: 100%;
}

.product button:hover {
background-color: #0056b3;
}

/* Cart Modal Styles */
.cart-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: none;
justify-content: center;
align-items: center;
z-index: 1000;
}

.cart-content {
background-color: white;
padding: 20px;
border-radius: 10px;
max-width: 500px;
width: 100%;
text-align: left;
}

#cart-items {
list-style-type: none;
padding: 0;
}

#cart-items li {
display: flex;
justify-content: space-between;
padding: 5px 0;
}

#close-cart {
margin-top: 20px;
background-color: #dc3545;
color: white;
border: none;
padding: 10px;
font-size: 1rem;
cursor: pointer;
border-radius: 5px;
}

#close-cart:hover {
background-color: #c82333;
}