Posts

Showing posts with the label web development

Positions in css || relative || absolute || fixed || sticky || static positions

Image
Position in CSS:   The position property specifies the type of position for our element. There are 5 position styles in CSS: static relative fixed absolute sticky Elements are also then positioned using top, bottom left and right properties which you can use first you need to set a position that works differently according to position type. < body >     < div class = "normal" >        First div     </ div >     < div class = "normal" >        second div     </ div >     < div class = "static" >        div with static position     </ div > </ body > Common CSS: .normal {     width : 300px ;     height : 150px ;     background-color : azure ;     margin : 20px ;     border : 3px solid black ;     padding : 10px ; } Position : static; Html elements position static by default . Top, bottom,right,left properties show no effect on the element.It is positioned div according to the normal flow of the page. .stat