Lecture 5 Flashcards Preview

Web-Centric > Lecture 5 > Flashcards

Flashcards in Lecture 5 Deck (9)
Loading flashcards...
1

Why should we use a css/html validator?

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

2

What are some common CSS errors?

• Typos and syntax
• Specificity
• Sort order
• Margins collapsing

3

What would cause a problem with specificity and sort order?

Caused by multiple CSS rules targeting the same element

4

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

• 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.

5

What are the steps of browser bug hunting?

-validate code
-isolate the problem

6

Why does IE border box model suck?

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.

7

Which CSS properties automatically give you layout?

• position
• float
• display
• width
• height

8

What is the IE6 duplicate character bug?

• 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

9

What are media queries?

• Useful for checking device, viewport, orientation (e.g., portrait,
landscape)
• Supported by:
• Chrome 21+
• IE 9+
• Firefox 3.5+
• Safari 4+
• Opera 9+