If you are the copyright holder of one of the photos used in this presentation and you would not like it to be used in an academic context, please contact me and I will remove the image from the presentation. I have made sure that only images are use that are available under the Creative Commons licence.
4. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
7. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
3. Calculate the values!
Sorry, you need to do some maths here…
8. 28% + 2% + 50% + 2% + 18% = 100%
220px + 20px + 480px + 20px + 220px = 960px
It needs to add up
or your layout will break!
9. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
3. Calculate the values!
Sorry, you need to do some maths here…
4. Apply the values in the CSS!
Try to be as concise as possible!
11. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
3. Calculate the values!
Sorry, you need to do some maths here…
4. Apply the values in the CSS!
Try to be as concise as possible!
5. Choose the method of layout!
Is it going to be float or position?
12. VS
http://flic.kr/p/56L7gN http://flic.kr/p/aeLWkc
• text related images • elements in a
• varying heights in concreted position
column layout • need to overwrite
( less hassle) document flow
• listing things • flexible
(document flow • need to overlap
matters)
13. VS
http://flic.kr/p/56L7gN http://flic.kr/p/aeLWkc
Rule
If elements should not interact, use absolute
positioning, if they should, use floats.
—says Kilian Valkhof
kilianvalkhof.com
14. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
3. Calculate the values!
Sorry, you need to do some maths here…
4. Apply the values in the CSS!
Try to be a concise as possible!
5. Choose the method of layout!
Is it going to be float or position?
6. Apply the method in the CSS!
Know where to put things!
16. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
3. Calculate the values!
Sorry, you need to do some maths here…
4. Apply the values in the CSS!
Try to be as concise as possible!
5. Choose the method of layout!
Is it going to be float or position?
6. Apply the method in the CSS!
Know where to put things!
7. Rewrite the CSS with combined selectors
and shorthand notation!
21. CSS Layout – Steps
1. Consider each element!
Which box belongs where? Create a declaration for each element.
2. Think of the widths!
Do design rules like the golden ratio or a grid play a role?
3. Calculate the values!
Sorry, you need to do some maths here…
4. Apply the values in the CSS!
Try to be as concise as possible!
5. Choose the method of layout!
Is it going to be float or position?
6. Apply the method in the CSS!
Know where to put things!
7. Rewrite the CSS with combined selectors
and shorthand notation!