Lecture 5 Flashcards

1
Q

Why should we use a css/html validator?

A

….

obviously because it identifies mistakes or potential mistakes before your site goes live….

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some common CSS errors?

A
  • Typos and syntax
  • Specificity
  • Sort order
  • Margins collapsing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What would cause a problem with specificity and sort order?

A

Caused by multiple CSS rules targeting the same element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What would cause a problem with the margin collapsing? What are some solutions?

A

• How element with block level children have their height
calculated
• If no vertical border or padding is defined…
• The height is the distance between the top and bottom border of the block level children

Solution: Add some padding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the steps of browser bug hunting?

A
  • validate code

- isolate the problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why does IE border box model suck?

A

because in IE the width includes the padding and border inside it, where in W3C browsers, the padding and border are added to the width.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which CSS properties automatically give you layout?

A
  • position
  • float
  • display
  • width
  • height
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the IE6 duplicate character bug?

A
• Present in IE 6 (Win)
• Duplicates the last few characters in the last of a
series of floats
• Duplicate characters shown beneath the last float
• Cause:
• HTML comments
• The fix:
• Remove HTML comments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are media queries?

A
• Useful for checking device, viewport, orientation (e.g., portrait,
landscape)
• Supported by:
• Chrome 21+
• IE 9+
• Firefox 3.5+
• Safari 4+
• Opera 9+
How well did you know this?
1
Not at all
2
3
4
5
Perfectly