This is text for a paragraph to demonstrate contextual positioning. Here are two divs, one nested in the other. The outer div has a red top border and the inner div has a gray background. The inner div has absolute positioning, and the outer div, with relative positioning, now becomes its positioning context: the inner div now positions itself relative to the outer div.

A code example from Stylin’ with CSS, Third Edition by Charles Wyke-Smith. Visit stylinwithcss.com for more CSS information and updates.