Quiz

  1. I'm a little confused about the box model. Is it a product of inline-block? / I think I struggle to conceptualize the box model, and would appreciate brushing up on that in class.

    The box model applies to every element, but differently between block elements and inline elements. The box model makes the most sense with the block elements: margins, border, padding, content.

    For inline elements, width and height are ignored, which almost makes sense. Mostly, I ignore box properties for inline elements.

    There are subtler things we'll get into later, but these are the essentials.

  2. does the style sheet need to be in the same folder as the html file?

    No. In fact, in Ottergram, it's not!

    It just has to be referenced by the html file. It can even be on another server, like normalize.css.

  3. It seems like there's a lot of options with CSS-- do you have advice on how to find a starting point when adding CSS to a page?

    Great question! I think it's helpful to step back and think about setting policy for your site: how do you want headers to look? Sections? Paragraphs?

    Then, you can focus in and say, how do I want this particular section to look.

    By default, web pages are like an infinite scroll of paper: long and narrow. People don't mind scrolling vertically; they hate scrolling horizontally. We mostly let blocks stack vertically on the page.

  4. I would like to talk more about IDs and selectors.

    Sure. ID is just one kind of selector, and not even the best one. Just the most specific, which is sometimes useful but often not.

    In fact, a book I used to use with this course never used an ID selector. They used classes instead, which then can be applied to as many items as they wanted.

    It's a fine approach, though it feels weird to me to create a class for something we know is unique.

  5. Why is it an option to use an ID selector in CSS instead of it being a rule to use it?

    Because you generally want to set a policy for a kind of thing and use that policy for all of them, rather than having each item treated uniquely.

  6. I know it says that we do not necessarily need to use ID's but can we use Id's in the class if we wanted to ?

    Sure, but my experience teaching this course is that students are very likely to mis-use an ID. Particularly for dynamic items. We don't have dynamic items yet, but we will later in the course, so we'll re-visit this admonition.

    But for the static web pages we have so far, IDs are fine.

  7. I would like to discuss IDs and normalize.css a bit more. I would also like to explore more about the CSS properties like padding and margins.

    I'd be glad to say more about this, especially if you give me some guidance....

  8. None any that I can think of, the reading made sense!

    I'm glad to hear it!