diff --git a/files/en-us/web/css/position/index.md b/files/en-us/web/css/position/index.md index 51b728cb404bd71..c70e90fa4ef8ef5 100644 --- a/files/en-us/web/css/position/index.md +++ b/files/en-us/web/css/position/index.md @@ -277,7 +277,7 @@ Fixed positioning is similar to absolute positioning, with the exception that th ### Sticky positioning -Sticky positioning can be thought of as a hybrid of relative and fixed positioning when its nearest scrolling ancestor is the viewport. A stickily positioned element is treated as relatively positioned until it crosses a specified threshold, at which point it is treated as fixed until it reaches the boundary of its parent. For example: +The following CSS rule positions the element with id `one` relatively until the viewport is scrolled such that the element is 10 pixels from the top. Beyond that threshold, the element is fixed to 10 pixels from the top. ```css #one { @@ -286,13 +286,13 @@ Sticky positioning can be thought of as a hybrid of relative and fixed positioni } ``` -The above CSS rule would position the element with id _one_ relatively until the viewport was scrolled such that the element would be less than 10 pixels from the top. Beyond that threshold, the element would be fixed to 10 pixels from the top. +#### List with sticky headings A common use for sticky positioning is for the headings in an alphabetized list. The "B" heading will appear just below the items that begin with "A" until they are scrolled offscreen. Rather than sliding offscreen with the rest of the content, the "B" heading will then remain fixed to the top of the viewport until all the "B" items have scrolled offscreen, at which point it will be covered up by the "C" heading, and so on. You must specify a threshold with at least one of `top`, `right`, `bottom`, or `left` for sticky positioning to behave as expected. Otherwise, it will be indistinguishable from relative positioning. -#### HTML +##### HTML ```html
+ The representation of an idea by a light bulb(💡) + is a commonly used metaphor that symbolizes the moment of inspiration or the + birth of a new idea. The association between a light bulb and an idea can be + traced back to the invention of the incandescent light bulb(💡) by Thomas Edison in the late 19th century. The light bulb is a powerful + symbol because it represents illumination, clarity, and the sudden + brightening of one's thoughts or understanding. When someone has an idea, it + is often described as a light bulb turning on in their mind, signifying a + moment of insight or creativity. The image of a light bulb also suggests the + idea of energy, power, and the potential for growth and development. +
+