91-9990449935 0120-4256464 |
CSS PositionThe CSS position property is used to set position for an element. it is also used to place an element behind another and also useful for scripted animation effect. You can position an element using the top, bottom, left and right properties. These properties can be used only after position property is set first. A position element's computed position property is relative, absolute, fixed or sticky. Let's have a look at following CSS positioning:
1) CSS Static PositioningThis is a by default position for HTML elements. It always positions an element according to the normal flow of the page. It is not affected by the top, bottom, left and right properties. 2) CSS Fixed PositioningThe fixed positioning property helps to put the text fixed on the browser. This fixed test is positioned relative to the browser window, and doesn't move even you scroll the window. Test it Now3) CSS Relative PositioningThe relative positioning property is used to set the element relative to its normal position. Test it Now4) CSS Absolute PositioningThe absolute positioning is used to position an element relative to the first parent element that has a position other than static. If no such element is found, the containing block is HTML. With the absolute positioning, you can place an element anywhere on a page. Test it NowAll CSS Position Properties
Next TopicCSS Vertical Align
|