Final projects
<!DOCTYPE html>
<html>
<head>
<link rel = "stylesheet" href="css/styles.css">
<link rel="icon" href="assets/devleagueemblem_360.png">
<title>Stock Website</title>
</head>
<body>
<div id = "container">
<header>
</header>
<div id = "welcome" class = "row">
Stuff here
</div>
<div id = "offers" class = "row">
Stuff here
</div>
<div id = "location" class = "row">
Stuff here
</div>
<footer id = "footer">
</footer>
</div>
</body>
</html>
p {
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
margin-left: 80px;
}
/*or you could put all 4 on the same line; the order is the same*/
p {
margin: 100px 150px 100px 80px;
}
The distance from the edge of the slide to the green border is the margin, whereas the distance from the text to the green border is the padding.
p {
padding-top: 50px;
padding-right: 30px;
padding-bottom: 50px;
padding-left: 80px;
}
p {
padding: 50px 30px 50px 80px;
}
<img src="smiley.gif" alt="Smiley face" height="42" width="42">
CSS Syntax:
.classname {
display: inline-block;
}
This is why we use classes. We can select all the divs/sections, and have them displayed as cool, convenient blocks. Combine a display: inline-block with a margin, and you get a very clean layout.
Use filler text in each section to show the margins/padding.