Added another website with border and margins and colors

This commit is contained in:
Muhammad Ibrahim 2024-11-20 12:05:47 +05:30
parent 0af715d5b3
commit 0bd12b840b
3 changed files with 119 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 KiB

View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Box Model</title>
<style>
div {
width: 200px;
height: 200px;
}
p {
margin: 0;
}
#first {
background-color: cadetblue;
padding: 20px;
border: 10px, solid black;
}
#second {
background-color: gold;
border: solid black;
border-right-width: 10px;
border-left-width: 10px;
border-top-width: 20px;
border-bottom-width: 20px;
margin-left: 260px;
}
#third {
background-color: indianred;
border: 10px, solid black;
margin-left: 40px;
}
</style>
</head>
<body>
<div id="first">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at sapien porttitor urna elementum lacinia. In
id magna pulvinar, ultricies lorem id, vehicula elit. Aliquam eu luctus nisl, vitae pellentesque magna. Phasellus
dolor metus, laoreet ac convallis sit amet, efficitur sed dolor.
</p>
</div>
<div id="second">
<p>
</p>
</div>
<div id="third">
<p>
</p>
</div>
</body>
</html>

View File

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Box Model</title>
<style>
div {
height: 200px;
width: 200px;
}
p {
margin: 0;
}
#first {
background-color: cadetblue;
padding: 20px;
border: 10px solid black;
}
#second {
background-color: gold;
border: solid black;
border-width: 20px 10px;
margin-left: 260px;
}
#third {
background-color: indianred;
border: 10px solid black;
margin-left: 40px;
}
</style>
</head>
<body>
<div id="first">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at sapien porttitor urna elementum lacinia. In
id magna pulvinar, ultricies lorem id, vehicula elit. Aliquam eu luctus nisl, vitae pellentesque magna. Phasellus
dolor metus, laoreet ac convallis sit amet, efficitur sed dolor. </p>
</div>
<div id="second">
</div>
<div id="third">
</div>
</body>
</html>