Posts

Showing posts from November, 2014

Revisiting the basics - Position in CSS

Image
In this article, I'll explain about CSS Position Property — one of the most basic CSS concepts. I will explain with examples each value associated with this property. I hope this will be helpful in better understanding. What is the Position in CSS? "Position" is a CSS property just like other properties. This property helps in placing an element or a group of elements at a particular location with respect to other elements or browser window. The position property accepts 5 different values — static, relative, absolute, fixed and sticky. position : static Adding static position to any element is equivalent to not applying any position property at all. Generally, this value isn't counted in CSS positioning. OK. Let's discuss about the importance of static positioning. Static position allows an element to behave normally. This is extremely useful when you need to override the inherited position value of an element. Properties like z-index, top, bot