Assessment wanted for Selectors Two


The above is the link to my work
and below is the link to the question

the border which I have given for the alert class is not designed, why?

Also when I wrote the css for 2 classes (alert and go), the previous work was overriden with the lastly added css, How to resolve this issue?

1 Like

Hello @vaishnavi_A.N

yo doing great just some notice here:

  1. for this point Give the element with a class of alert a 1px grey border.
    your way only set the size of border
    border:1px; but you should provide the style also as the defualt style is none
    so give the border style and width and grey color
  2. for step 3 If the element with a class of alert also has a class of stop, make the background red. If the element with a class of alert also has a class of go, make the background green.
    it ask you if the element has class alert and stop and not or
    so it should be .alert.stop not .alert , .stop same thing for the other one

hope that help and have a nice day :slight_smile:

1 Like

Hi @vaishnavi_A.N

Some hints:

border
When using border you should always define the width, style and color. Using just the width won’t work, because style defaults to none (no border). For this exercise the solid style would work. Can you guess the correct value for border?

overridden background
The comma in your selectors mean: “Either the first class or the second class”. We need a selector that says: “The first class and the second class”. This can be achieved by directly writing the second class after the first class (without a space or other characters. For example .first.second means: “The elements must have class first and class second to have the CSS applied.”

If you like you can update your CodePen and I will have another look :slightly_smiling_face:

All the best,
Michael

1 Like

Oops, @justsomeone. I haven’t noticed you already answered :grin:

1 Like

@mikoMK now you have to pay me with pizza and chocolate :joy:

1 Like

At least we gave the same answer and not completely different things :innocent:

1 Like

lool sure but you can not escape from paying me looool

1 Like

Apparently chocolate pizza is a thing. Here you go with two in one :nauseated_face:

really

1 Like

Thank u very much @mikoMK and @justsomeone,
Both are helping me in every way possible, every single suggestion is invaluable, learning a lot through you both,Thank u again.
And i did the required corrections, It worked, Thank you.

2 Likes

Thank you for the kind words :blush:
I’m glad we could give you some helpful advice.

2 Likes

you very welcome @vaishnavi_A.N

and i do not deserve those words but glad that we helped you and hit our doors anytime if you need anything else :slight_smile:

2 Likes