background preloader

Tutorial

Facebook Twitter

Howto

Php. Cms. Kuler. Better Semantics with CSS Combinators & Selectors » HTML & CSS, Layout » Design Festival. I’m going to begin with a provocative claim: I believe CSS is one of the most difficult-to-master computer languages we have.

Better Semantics with CSS Combinators & Selectors » HTML & CSS, Layout » Design Festival

It doesn’t have a complex syntax and you certainly don’t need a doctorate in IT to understand it. However, it’s one of the only popular languages that isn’t “logical”—and I mean that in the most literal sense. Unlike other familiar web development languages such as JavaScript, PHP or even SQL, problems aren’t worked out via common logic. Spoken algorithms like “if X then do Y, otherwise do Z” or “select all of Y then do X with them” don’t translate to a language like CSS. The CSS Box Model. At the risk of over-repeating myself: every element in web design is a rectangular box.

The CSS Box Model

This was my ah-ha moment that helped me really start to understand CSS-based web design and accomplish the layouts I wanted to accomplish. We've talked about the positioning of these boxes a bit, and about their behavior.