Skip to content

Commit 377cfba

Browse files
committed
Finished margins and padding
1 parent 09d2acf commit 377cfba

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

DIVs/homepage.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
top: 0px;
2020
width: 100%;
2121
height: 60px;
22-
padding: 10px;
22+
padding: 0px 10px;
2323
}
2424
.menu
2525
{
@@ -29,6 +29,7 @@
2929
position: fixed;
3030
left: 0px;
3131
top: 60px;
32+
padding: 10px 0px 0px;
3233
}
3334
.content
3435
{
@@ -45,7 +46,6 @@
4546
bottom: 0px;
4647
height: 60px;
4748
width: 100%;
48-
clear: both;
4949
}
5050
</style>
5151
</head>

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,70 @@ Oh darn! Did you see how our header expanded? If you did this right, our heade
880880

881881
There is a way to fix this.
882882

883+
So, instead of adding space to margins and padding on all four sides, you can add them just to the top, bottom, left, and/or right. There's a few ways to do this:
884+
885+
* `margin: 5px 10px 15px 0px;`
886+
- top margin is 5px
887+
- right margin is 10px
888+
- bottom margin is 15px
889+
- left margin is 0px
890+
* `margin: 15px 0px 5px;`
891+
- top margin is 15px
892+
- right and left margins are 0px
893+
- bottom margin is 5px
894+
* `margin: 5px 10px;`
895+
- top and bottom margins are 5px
896+
- right and left margins are 10px
897+
* `margin: 15px;`
898+
- all four margins are 15px
899+
900+
The same goes for `padding`, you can also do `padding: 5px 10px 15px 0px;`, etc. for all of the properties above. We're going to make some changes to both the `.header` and the `.menu` here:
901+
902+
html
903+
{
904+
height: 100%;
905+
}
906+
body
907+
{
908+
height: 100%;
909+
margin: 0px;
910+
}
911+
.header
912+
{
913+
background-color: #99B5DD;
914+
position: fixed;
915+
top: 0px;
916+
width: 100%;
917+
height: 60px;
918+
padding: 0px 10px;
919+
}
920+
.menu
921+
{
922+
background-color: #DE90B1;
923+
height: 100%;
924+
width: 15%;
925+
position: fixed;
926+
left: 0px;
927+
top: 60px;
928+
padding: 10px 0px 0px;
929+
}
930+
.content
931+
{
932+
height: 200px;
933+
position: absolute;
934+
top: 60px;
935+
left: 15%;
936+
padding: 10px;
937+
}
938+
.footer
939+
{
940+
background-color: #0F215D;
941+
position: fixed;
942+
bottom: 0px;
943+
height: 60px;
944+
width: 100%;
945+
}
946+
883947
Psh like I'm going to write this before I eat another cookie. Break time.
884948

885949
## Wut

0 commit comments

Comments
 (0)