WDD 130 positioning exercises

For each activity match make the boxes match the image by modifying the stylesheet.

Activity 1

Hint 1

Check out the activity instructions in Ilearn!

Follow the instructions to make the boxes match this image.

Activity 2

Hint 2

Remember that the best way to shift elements around slightly on the page is with Margins. You could also use Grid. Either would work for this. If you choose margin remember that you can use a negative margin. (ie margin-top: -20px;)

Properties used:

  • margin-top, margin-left
  • ...or...
  • grid-template-columns: 50px 50px 50px 50px 50px

Overlap and stagger the squares like in this image.

Activity 3

Hint 3

This one is going to be best solved with CSS Grid. Remember to make the boxes the right width first...then start moving them around.

Properties used:

  • display:grid;
  • grid-template-columns:
  • grid-column-gap:
  • grid-column:
Create the 2 column layout like in this image.

Activity 4

Hint 4

For the others we have been primarily concerned with width. For this one you will need to adjust height as well.

Properties used:

  • display:grid;
  • grid-template-columns:
  • grid-row:
Duplicate the positioning in this image.

Activity 5

Hint 5

Grid is not the right way to do this. In fact there is only one way to really do that...and that is with float. Remember that we float the thing we want the text to wrap around. Also remember to start by making all the shapes the right size and shape.

Properties used:

  • float: left;
Wrap the text around the square like in this image. This is one case where Grid is NOT the right way to solve this one and will in fact make it harder if you try to use it!
Step 01: Continue creating the main page for your chosen web site by modifying the CSS file you created in week 9's Adding Classes and IDs to Your Website assignment. This week, you will position all of the content on your main page using the CSS positioning techniques taught in KhanAcademy. When you are done, your webpage layout should reflect what you outlined in the wireframe you designed in the assignment Your Own Site Diagram and Wireframe in week 3.
If you have changed your mind on how you want the content of your main page laid out, take an opportunity to update your wireframe before completing this assignment (it is much easier to experiment with different layouts in a wireframe than it is to do so by modifying the CSS). Also, if you find that you are having trouble with using CSS positioning, feel free to review the concepts at the learn layout site: http://learnlayout.com/. You should be able to apply these principles to your site. For futher help, refer back to the Max Design site used in the beginning of the course for an example of how to implement your site design.

Activity 6

Hint 6

This one is all about visualizing the grid behind the layout. If you are having a hard time doing that first: all the sizes are even multiples of 100, and second here is another example with the lines drawn: example 6 with lines. For this one you will find it easiest if you use px for the column width. You can also use z-index to control the element layering.

Properties used:

  • display:grid;
  • grid-template-columns:
  • grid-column:
  • grid-row:
  • z-index:
Duplicate the positioning in this image.