Seeking assistance in creating a dynamic weekly recipe webpage using HTML and CSS. The goal is to have a form where users can submit a recipe, which will then be added to a specific day of the week in a table displaying all recipes for that day. Can someone guide me on how to achieve this? Thank you. Below is the code I have so far:
<!DOCTYPE html>
<html>
<head>
<title> Weekly Recipes </title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="heading">
<h2>Weekly Recipes</h2>
<div>
<form method="POST" action="index.html">
<input type="text" name="task" class="task_input">
<button type="submit" class="task_btn" name="submit">Add Recipe</button>
</form>
<div>
<table id="t01">
<tr>
<th>Sunday</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
</tr>
</table>
</div>
</body>
</html>
CSS Code:
.heading{
width: 400px;
height:150px;
margin: 30px auto;
text-align: center;
color: #6B8E23;
background: #FFF8DC;
border: 2px solid #6B8E23;
border-radius: 20px
}
form{
width:250px;
margin: 30px auto;
border-radius :5px;
padding: 10px;
background: #FFF8DC;
border: 1px solid #6B8E23;
}
table {
width:100%;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 15px;
text-align: left;
}
table#t01 tr:nth-child(even) {
background-color: #eee;
}
table#t01 tr:nth-child(odd) {
background-color: #fff;
}
table#t01 th {
background-color: #6B8E23;
color: white;
}