I am having trouble with stacking:
Example
I need to get class_span to have a higher stacking order than class_div. I tried to change the z-index but with no luck. Does any one know of any solutions?

No, you're right to use z-index. But z-index only works when the element to which it's applied is positioned.

Try:

.class_div{
    position: absolute; 
    border: 100px solid; 
    width:100px;
    height:50px;
    left:0px;
    z-index:1;
}
.class_span{
    float: left;
    position:relative;
    z-index:2;
}
commented: This's exactly that i need! Thanks. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.