© Andy Budd and Emil Bjorklund 2016

Andy Budd and Emil Björklund, CSS Mastery, 10.1007/978-1-4302-5864-3_5

5. Beautiful Boxes

Andy Budd and Emil Björklund2

(1)Brighton, UK

(2)Malmo, Sweden

In previous chapters you learned that every element of an HTML document is made up of rectangular boxes: from the containers that hold the structural parts of your page, to the lines of text in a paragraph. You then spent the last chapter learning how to style the text content of your pages.

Web design wouldn’t be as creative or flexible if we weren’t able enhance the look of these boxes, or complement them with colors, shapes, and imagery. This is where the CSS properties for backgrounds, shadows, and borders come in, as well as content images through the img

Get CSS Mastery, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.