Ask Your Question
1

Code in "Directions" task

asked 2020-03-31 14:05:31 -0500

nikolfazek gravatar image

updated 2020-03-31 14:07:54 -0500

I've just finished the Directions tasks and I have question in connection with that. In the task it was suggested to use the following tag:

.centered { text-align: center; }

I don't know why, but it doesn't work for me, so I put it to the main block. Here is the link to my codepen: https://codepen.io/nikolfazek/pen/BaN...

Does it make any difference? Should I make a center class?

Thank you in advance, Niki

edit retag flag offensive close merge delete

Comments

irom a valaszt :)

aze gravatar imageaze ( 2020-03-31 14:10:30 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-31 14:13:25 -0500

aze gravatar image

updated 2020-03-31 14:15:27 -0500

Because the first part is the selector and you apply the rule on the .centered CSS class, but you haven't assigned that to anything. It works perfectly though if you use the p tag as the selector for example :) And it also works with the main as a selector, since that is also on the page that can have this rule.

edit flag offensive delete link more

Comments

Thank you, it works now! magic :)

nikolfazek gravatar imagenikolfazek ( 2020-03-31 14:17:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-03-31 14:05:31 -0500

Seen: 33 times

Last updated: Mar 31