The Ultimate HTML5 & CSS3 Series: Part 1 Borders Shapes

WHy does .box work and not #triangle-up. On the shapes of CSS site it looks like it says to code it #triangle-up.

Capture d’écran, le 2023-11-26 à 3.56.37 PM
Capture d’écran, le 2023-11-26 à 3.57.21 PM

for the box its targeting a class but for the triangle it targets an id, be sure to set id on your div not class ie: <div id="triangle-up"></div>

1 Like

I have no idea what that means. Can you explain what you just said?

Go back to the lesson on basic CSS selectors. Pay particular attention to class selectors and id selectors. For example, in the code above .box is a class selector and #triangle-up is an id selector.

To apply the class styles to an HTML element use the class HTML attribute:

<div class="box"></div>

To apply id styles to an HTML element use the id HTML attribute:

<div id="triangle-up"></div>
1 Like

I need a lot more context to understand than that. That feels like you just said the same thing again.

Actually never mind the first part of the message was cut off! Thank you sir

1 Like