HTML element with multiple classes

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
Jamin2112
Messages
973
Reaction score
12
Suppose I write the following in my stylesheet

Code:
   .class1
    {
        position: relative;
    }
    .class2
    {
        position: absolute;
        bottom: 0px;
    }

and then the following in my body

Code:
    <div class="class1 class2">
    </div>

Will that div take a relative position or will it be positioned absolutely at the bottom of the page? Yes, I know I could test this myself, but I'd like to first understand the logic of where it should be.
 
Physics news on Phys.org