Skip to content

Instantly share code, notes, and snippets.

@nicktu12
Last active July 19, 2017 20:10
Show Gist options
  • Save nicktu12/9ec62bdfa21ebce30e8d25cfd12119a0 to your computer and use it in GitHub Desktop.
Save nicktu12/9ec62bdfa21ebce30e8d25cfd12119a0 to your computer and use it in GitHub Desktop.
CSS Challenges Mod 1
##### Challenge 1
I created square divs, and used floats to position them along the top of the page, along with display: inline-block. Added margin to div 2 to create some space between div 2 and div 3.
[Challenge 1](https://codepen.io/nicktu12/pen/MoZLNym)
##### Challenge 2
I created square divs, and set margin auto on div 2 to center in screen, and float right on div 3 to push to right edge of screen.
[Challenge 2](https://codepen.io/nicktu12/pen/rwPQvm)
##### Challenge 3
I created a div within a div, and used margin auto to center the parent div and absolute positioning to position the innenr div within the parent div.
[Challenge 3](https://codepen.io/nicktu12/pen/WOBqPP)
##### Challenge 4
I created two divs of the same size but differing colors, and used absolute positioning to position the second div over the center of the first one.
[Challenge 4](https://codepen.io/nicktu12/pen/yXWmNy)
##### Challenge 5
I created three identical divs, and used margin-left: auto on the first div to align it along the right side. The second div uses margin: auto on both sides and the third div is left untouched in its original position.
[Challenge 5](https://codepen.io/nicktu12/pen/dRBeVd)
##### Challenge 6
I created two divs inside my larger gray div, which is positioned aboslutely to the bottom right of the page. The two divs inside are positioned absolutely relative to the larger gray div.
[Challenge 6](https://codepen.io/nicktu12/pen/WOqJBv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment