How can I display my element(class=\"line\"
) over all other elements/div?
we can give in following ways:
we can add class="line"
to position
property
and mention Z-index
property (layer concept
)
.line
{
position:absolute;
z-index:2
}
.otherclass
{
position:absolute;
z-index:1;
}
we should specify both in Position
property
You need to set z-index
property of the element. ie
.line{
position:absolute;
z-index:100;
top : 0;
left: 0
}
Add z-index to the css styling.
z-index:100;
why do you want to avoid margin-top?