Assessment wanted for "Backgrounds and borders test 2"

Code pen link
task link
I want someone to review my solution. Please feel free to point out the flaws.:slightly_smiling_face:

Great job, @Dinesh_Sake!

The only tiny missing thing I see is that the text isn’t horizontally centered. (Compare the second line with the solution image.)

Side note: When using CodePen you should use the code from Download the starting point for this task below the exercise. There is some hidden CSS in the interactive editor on the task page (like the box width). This way you can make sure that it looks the same as on the task page.

Cheers,
Michael

2 Likes

Sorry to bother you again Sir. Well, I did the changes that you suggested. But, I’m unable to horizontally center the second line of the text. I did try the pseudo element first line to move the first line horizontally using padding with negative value and leave the other line as it is, but I can’t budge it even an inch(or pixels rather :sweat_smile: ).
So, how can I target the second line and apply css rules to it? It would surely be an interesting stuff to learn.

1 Like

I’m not feeling bothered at all. I’m happy to help :smiley:

Mentioning the second line in particular was a bit misleading from me. Sorry. The only thing you have to do is to add text-align: center; to h2. When we center text like that every line gets centered. We don’t see any change in the first line because it’s already touching the paddings, but the second line will be nicely centered.

Have a nice day,
Michael

1 Like