• Responsive web development
• Relative measurements (%, (r)em, vw)
• Media queries
• Positioning (absolute, relative, fixed)
• Floating and clearing
- Change your absolute percentages into relative percentages
- Add at least two media queries to your CV
Today we will start working on the following assignment, we will only implement the first section with floats today:
-
Grids exercise
- Download the HTML and images in the folder Homework 2
- You are going to write the CSS for this page
- You are not allowed to change the HTML
- The page contains two grids: the first one should work using floats, the second using flex box. Be careful not to mix the two!
-
We want the grid to look as follows:
- On mobile phones: a two column grid, with the exception that the first item spans the full width - On tablets: a three column grid, with the exception that the first two items span the full width together (so first we have two columns, then after the first two items we have three columns) - On desktops: a four column grid, with the exception that the first item spans two columns. -
There should be some space between the grid items
-
Make the page look beautiful by adding some more CSS! Some tips: - How about some nice colors, fonts, hover styles? - According to the grid specification, some products are bigger than others. Maybe these are "highlighted" products, so the rest of the styling could also be different.
- Simple and more complex examples of nth-child selector http://nthmaster.com/