Chapter 4. CSS

In the early days of the World Wide Web, content was king, the layout rather irrelevant. Then, the Web started to commercialize, and web developers started abusing HTML, which somehow transformed from the markup language it became to an inadequate design tool. With CSS (Cascading Style Sheets), the situation became quite a bit better, since it allowed styling the contents of an HTML page—HTML was a markup language again, defining the content and the structure of a page, but not necessarily how it looked.

Using JavaScript, CSS effects can be applied on the fly. Most of the phrases in this chapter are very generic in nature so that you can apply these techniques to any CSS design challenges you may face. Some phrases, however, solve ...

Get JavaScript™ Phrasebook: Essential Code and Commands now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.