Module 7 Week 13
Module 7 Week 13
Module 7
Learning Outcomes:
Learning Content
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>CSS Box Model - Stylish Design</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.box {
width: 350px;
background-color: #ffffff;
margin: 30px;
Buraga, R.L. Learning Module in Integrative Programming and Technologies
padding: 20px;
border: 8px solid #3498db;
border-radius: 10px;
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
text-align: center;
}
.box h2 {
margin: 0;
color: #3498db;
}
.box p {
color: #333;
font-size: 16px;
}
</style>
</head>
<body>
<div class="box">
<h2>Stylish Box Model</h2>
<p>This design applies margins, borders, padding,
and content effectively.</p>
</div>
</body>
</html>
* {
outline: 1px solid red; /* Helps visualize the
box model */
}
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.box {
width: 350px;
background-color: #ffffff;
margin: 30px;
padding: 20px;
border: 8px solid #3498db;
border-radius: 10px;
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
text-align: center;
}
.box h2 {
margin: 10px 0;
color: #3498db;
}
.box p {
color: #333;
font-size: 16px;
}
/* Debugging styles */
.debug-box {
background-color: rgba(255, 0, 0, 0.1); /*
Transparent red to see overlapping */
margin: 20px;
padding: 15px;
border: 5px dashed red;
}
</style>
</head>
<body>
<div class="box debug-box">
<h2>Debugging Box Model</h2>
Buraga, R.L. Learning Module in Integrative Programming and Technologies
Guided Activity
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Complete Web Page Example</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
}
header {
background: #3498db;
color: white;
text-align: center;
padding: 20px;
}
nav {
background: #2980b9;
padding: 10px;
}
nav ul {
list-style: none;
display: flex;
justify-content: center;
}
nav ul li {
position: relative;
margin: 0 15px;
}
Buraga, R.L. Learning Module in Integrative Programming and Technologies
nav ul li a {
color: white;
text-decoration: none;
padding: 10px 15px;
display: block;
}
nav ul li ul {
display: none;
position: absolute;
top: 35px;
left: 0;
background: #1f618d;
padding: 10px;
list-style: none;
}
nav ul li:hover ul {
display: block;
}
nav ul li ul li {
margin: 5px 0;
}
.container {
width: 80%;
margin: 20px auto;
padding: 20px;
background: white;
border: 5px solid #3498db;
border-radius: 10px;
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}
section {
margin-bottom: 20px;
}
footer {
background: #2c3e50;
color: white;
text-align: center;
padding: 15px;
margin-top: 20px;
}
form {
display: flex;
flex-direction: column;
}
Buraga, R.L. Learning Module in Integrative Programming and Technologies
<h2>Contact Us</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name"
required>
<label for="email">Email:</label>
<input type="email" id="email"
name="email" required>
<label for="message">Message:</label>
<textarea id="message" name="message"
rows="4" required></textarea>
<button type="submit">Submit</button>
</form>
</section>
</div>
<footer>
<p>© 2025 My Website. All rights
reserved.</p>
</footer>
</body>
</html>
Header (<header>)
Displays the title of the webpage.
Uses background color, padding, and text alignment
for styling.
Sections (<section>)
Contains headings (<h2>) and paragraphs (<p>) for
content display.
The first section introduces the webpage.
The second section contains a contact form.
Footer (<footer>)
Displays a copyright message.
Styled with a dark background color and centered
text.
Debugging Features
The box-sizing: border-box; ensures padding and
borders don’t increase element size.
The outline: 1px solid red; helps visualize element
boundaries.
Additional References:
1. https://www.youtube.com/watch?v=W2kTZeKCch0
2. https://www.youtube.com/watch?v=M6coJNLFBWI
Buraga, R.L. Learning Module in Integrative Programming and Technologies
Assessment Task 7
References: