diff --git a/flex/flex-center/README.md b/flex/flex-center/README.md new file mode 100644 index 0000000..56cbbb6 --- /dev/null +++ b/flex/flex-center/README.md @@ -0,0 +1,12 @@ +# CENTER THIS DIV +This one is simple, but it's something that you'll want to do ALL THE TIME. Might as well get it out of the way now. + +All you need to do is center the red div inside the blue container. + +## Desired Outcome +![outcome](./desired-outcome.png) + +### Self Check +- Is the red div centered? +- Did you _only_ use flexbox to center it? + diff --git a/flex/flex-center/desired-outcome.png b/flex/flex-center/desired-outcome.png new file mode 100644 index 0000000..711b697 Binary files /dev/null and b/flex/flex-center/desired-outcome.png differ diff --git a/flex/flex-center/index.html b/flex/flex-center/index.html new file mode 100644 index 0000000..d904030 --- /dev/null +++ b/flex/flex-center/index.html @@ -0,0 +1,15 @@ + + + + + + + CENTER THIS DIV + + + +
+
center this div
+
+ + \ No newline at end of file diff --git a/flex/flex-center/style.css b/flex/flex-center/style.css new file mode 100644 index 0000000..e35feac --- /dev/null +++ b/flex/flex-center/style.css @@ -0,0 +1,15 @@ +.container { + background: dodgerblue; + border: 4px solid midnightblue; + width: 400px; + height: 300px; +} + +.box { + background: palevioletred; + font-weight: bold; + text-align: center; + border: 6px solid maroon; + width: 80px; + height: 80px; +} \ No newline at end of file