Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • Aaron Li• 90

    @aaronli722

    Submitted

    1. Is there a common practice of the css properties order? for example, display comes first, then width/height, and then margin/padding, etc?

    2. When to use class, when to use id?

    In my concept, id is use when the element is unique, for example #card in this challenge. But when I studied the html code of other pages, I found that they may also use class to describe unique element. So when to use class, when to use id?

    @Vitiyah

    Posted

    Hi Aaron, there are no rules/order for general properties, for example width can be followed by height or height followed by width. But for certain types of CSS properties such as flexbox and grid.You cannot place align-items: center first without declaring display: flex. Imagine it like an onion layer.

    And for your question on when to use id and class, you're correct, the basic difference is that id is for unique element and class can be used many times for all the elements that you want to apply a particular styling. But class can also be used for unique elements. I preferably use class all the time for styling purpose and use id for Javascript purposes to just select a particular element.

    Marked as helpful

    0
  • @smirkintj

    Submitted

    Hi, I'd say I'm very fairly new to coding. I had to refer to several youtube videos on how to do this challenge just to understand why did they do it in a certain way and mostly just ended up following how it is done.

    I'd really appreciate if there's a better and simpler way to do this challenge so I can try to learn and understand what other ways are there to do this challenge.

    @Vitiyah

    Posted

    Hi Putra,

    Follow the DRY method, Don't Repeat Yourself to make the code much shorter, for example

    .content h3, .content p { text-align: center; }

    This will make the code much shorter. Otherwise, good coding and great start. Wish you all the best

    Marked as helpful

    1