In this chapter, we will look in further depth at some of the vital concepts when positioning page elements using CSS. If you’re reading this book chapter by chapter, you’ll already have come across some of these concepts used in the examples. Here we’ll take a proper look at them, and see how they can be used in combination to layout our pages and components.
Chapter 8CSS Positioning Basics
At first glance, classes and IDs seem to be used in much the same way: you can assign CSS properties to both classes and IDs, and apply them to change the way HTML elements look. But in which circumstances are classes and IDs best applied?
How do I decide when to use a class and when to use an ID?
The most important rule where classes and IDs ...