Skip to content

Instantly share code, notes, and snippets.

@jwood11atx
Last active October 17, 2016 01:32
Show Gist options
  • Save jwood11atx/67a7ec5f97c477e188783cff0b0b8665 to your computer and use it in GitHub Desktop.
Save jwood11atx/67a7ec5f97c477e188783cff0b0b8665 to your computer and use it in GitHub Desktop.
##### Challenge 1
-Made all 3 divs an inline-block. Then I put div2&3 into an article and floated the entire article right.
[Challenge 1](http://codepen.io/jwood11atx/pen/ALdKzA)
-----------------------------------------------
##### Challenge 2
-I left div1 as a block. I auto margined div 2. Then I put div3 into section, made section relative, made div3 absolute
offset it to right 0.
[Challenge 2](http://codepen.io/jwood11atx/pen/vXAKxd)
-----------------------------------------------
##### Challenge 3
-Wrapped the 2 divs into section. Made section relative and margin from the top 25px. Auto margin for div1. For div2 I
made it absolute, set all of it's offsets to 0 and then auto margin.
[Challenge 3](http://codepen.io/jwood11atx/pen/qaKNgp)
-----------------------------------------------
##### Challenge 4
-I left div1 alone. Div2 I made absolute and just offset it from top and left half of the pixels of div1.
[Challenge 4](http://codepen.io/jwood11atx/pen/XjYjpV)
-----------------------------------------------
##### Challenge 5
-I left div 3 alone. Div1 I pushed all of the margin to its left and then transform&translated it 100% of its width to the
left so it would be on the screen again. I auto margined Div 2.
[Challenge 5](http://codepen.io/jwood11atx/pen/XjYjYq)
-----------------------------------------------
##### Challenge 6
-I wrapped the 3 divs into a section and made it absolute. I made div2&3 absolute, div2 offset bottom 0,
and div3 offset right&top 0. Then I offset section bottom&right 0.
[Challenge 6](http://codepen.io/jwood11atx/pen/bwKwPq)
-----------------------------------------------
##### Challenge 7
-I wrapped the divs into a section. Made section inline-block and and relative. I made div2 absolute and offset
right&bottom 0.
[Challenge 7](http://codepen.io/jwood11atx/pen/rrKWNv)
-----------------------------------------------
##### Challenge 8
-Same exact thing as Challenge 7 but offset top 0 instead of bottom 0.
[Challenge 8](http://codepen.io/jwood11atx/pen/EgRNVr)
-----------------------------------------------
##### Challenge 9
-Wrapped the 3 divs into section and made it relative and inline-block. Made div2&3 absolute and instead of setting all of
the offests to 0 and auto margin, I transform&translated -50% to move the axis to the center of div2&3 and then offset left
50% as another technique to center and absolute. Then I offset div2 top 0 and div3 bottom 0.
[Challenge 9](http://codepen.io/jwood11atx/pen/LRAbQp)
-----------------------------------------------
##### Challenge 10
-Wrapped the 3 divs into Section. Made section inline-block and relative. Made div2&3 absolute and then just offset div2
top 25px and left 25px and div3 top 25px and right 25px.
[Challenge 10](http://codepen.io/jwood11atx/pen/JRkEvy)
-----------------------------------------------
##### Challenge 11
-Wrapped the 3 divs into Section. Made section inline-block and relative. Made div2 absolute and offset bottom 0 and right 0.
Made div3 absolute and offset bottom 10px and right 10px.
[Challenge 11](http://codepen.io/jwood11atx/pen/RGBBOy)
-----------------------------------------------
##### Challenge 12
-Wrapped the 3 divs into Section. Made section inline-block and relative. Made div2&3 absolute and offset bottom 0 and right 0
and then I transform&translated div2 50% of its width to the right and transform&translated div3 50% of its height down.
[Challenge 12](http://codepen.io/jwood11atx/pen/ORworq)
-----------------------------------------------
##### Challenge 13
-I wrapped the divs into a section. I set the divs to absolute, set offset to all at 0, and then transform&translated in
50% increments of their width and height.
[Challenge 13](http://codepen.io/jwood11atx/pen/GjBXkw)
-----------------------------------------------
##### Challenge 14
-I wrapped the 2 divs into section and made section absolute and inline-block and offset right 8px. I made div2 absolute
and offset bottom 0 and right 0.
[Challenge 14](http://codepen.io/jwood11atx/pen/yaqxPa)
-----------------------------------------------
##### Challenge 15
-Wrapped all divs into section and made section relative and inline-block. Div2&3 are same size and color. Div1&4 are same
size and color. Left div1 alone. Div2 absolute, offset top 0, right 0. Div3 absolute, offset bottom 0. Div4 absolute,
offset right 0, bottom 0. I gave section a width of 420px and height of 350px so they would have the proper spacing between
divs.
[Challenge 15](http://codepen.io/jwood11atx/pen/yaqxpa)
-----------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment