Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS subclasses, am I doing it right?

Tags:

css

subclass

.popUp
{
    width: 300px;
    height: 300px;
    position: fixed;
    top: 0px;
    left: 0px;
    background-color: white;
}
.question .popUp
{
    width: 300px;
    height: 20px;
    border: 1px solid black;
    background-color: black;
}

As you can see I'm trying to make the question class a subclass of the popUp class. From what I googled this should work, but it doesn't. If I do this instead:

.question
{
    width: 300px;
    height: 20px;
    border: 1px solid black;
    background-color: black;
}

It works, but that misses the point.

like image 340
Juicy Avatar asked Dec 20 '22 00:12

Juicy


1 Answers

popup class is parent container then you should select it as below.

.popUp .question 

so syntax would be parent space child

like image 64
Dipesh Parmar Avatar answered Jan 05 '23 02:01

Dipesh Parmar