Assessment wanted for "Marking up a letter" - Dill

Hello,

I would appreciate it if you took a look at my code.

I do have one question however. I cannot get the date in line 23 to right-justify even though i have assigned the class=sender-column to it. That class works well for the address, but it did not seem to work for the date and I don’t know enough to know why.

I will attach links to my code and the assignment.

Thank you

Dill.

FWIW, i already see that I messed up and put <strong> around the wrong words in the address and telephone lines.

Sorry, i checked the “answers” tab and I figured out what I did wrong. The class attribute must go in the paragraph. the date element cannot take attributes

You can check in this page that the address element is a block element, and this kind of elements are affected by alignment CSS properties.

Inline elements like time are not affected by alignments so they go with the parent element flow. To make it behave as expected you would need to place it inside a paragraph element, like you have discovered, and place the CSS classes on it.

Nonetheless, all elements accept classes, but bear in mind the characteristics of each one.

3 Likes

Thanks @dsthode for the explanation :+1:

1 Like

Nonetheless, all elements accept classes, but bear in mind the characteristics of each one.

Thank you for this specific clarification. This made it make sense for me