From the course: CSS: Float-Based Page Layouts (2012)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Relative positioning

Relative positioning - CSS Tutorial

From the course: CSS: Float-Based Page Layouts (2012)

Start my 1-month free trial

Relative positioning

When people talk about controlling page layout with CSS, often the property that they are actually referencing is the position property. In fact, way back in the day when designers first started crafting layouts without tables, they even referred to the CSS involved as CSS-P, or CSS positioning. Now the positioning property is indeed an important one, and in this chapter, we are going to go over the various properties and values associated with positioning and how we can use those properties to control elements within our layout. Now we are going to start with what is perhaps the most commonly used positioning value, and that's relative positioning. To demonstrate this, I have the relative. htm file open from 04_01 folder. And in fact, if I scroll down you can see, we have a fairly simple page. I've got a little bit of text referencing the positioning property, and then I have these three elements right here that we are going to focus on. There are three div tags, and they have the…

Contents