Join Morten Rand-Hendriksen for an in-depth discussion in this video Changing the contents within the box, part of Making Sense of the CSS Box Model.
- [Instructor] Working from the inside out, … the first thing we can do with the CSS box … is change the appearance of the contents … within the box itself. … Because the nature of the box … is mainly as a text layout tool, … a large number of the properties we have available to us … relate to how text is displayed. … As you've seen before, … the most basic change you can make … to the contents in the box is changing the font. … We can change the font family, … providing either a single or a list of fonts … for the browser to use. … We can also change the font size, … font weight, … and font style from normal, to italic to oblique. … We can also change the appearance of text in other ways. … We've already talked about letter spacing and line height. … There's also a word spacing property … that adds space between each word. … And we can align text left, center, right or justified, … and add indentation to the first line with text indent. … CSS can also be used to control the font display. …
- Designing with boxes
- The origin of the box in typography
- What is the CSS box model?
- Changing the contents within the box
- Floating and clearing content
- Using the clearfix
- Working with Float, Flex, and Grid
- CSS shapes