Same code? different results!

I lived up to my end of your bargain. Your turn.

Those negative and collapsing margins affect every page that uses the newhtl.css stylesheet.

If you would like a visible benefit of fixing them (if having slightly better code isn’t sufficient motivation) note that you will reveal an additional 10px at the top of the “wow” image at the top of each page (those 10px are presently hidden from view).

Would you like an explanation along with the fix, or just the quick fix?

I tend to be methodical, so I would prefer to describe these boxes and suggest choices. Would you prefer to skip the “educational opportunity” and cut to the chase or are you willing to risk understanding how to enclose boxes within boxes? Do you keep notes to combat the CRS syndrome? I do… then I forget that I wrote them. Sometimes, being methodical is all I have.

What is your operating system and your primary/preferred browser? That question leads up to promoting the dev tools at your disposal. Obviously, you have seen that perfectly valid code (according to the Validator) can fail just as miserably as invalid code, so you need other tools and a better understanding of how HTML in concert with its CSS behaves. It IS a concert. The same CSS will not necessarily work on two pages IF the HTML is different (and it usually is). Thus the value of developing a coding strategy, and understanding targeting and specificity.

One aside thing I would like to know for my info only is what tool you use to write your code?

1 Like