DEV Community

Cover image for 4th Day on the wagon
Ruby
Ruby

Posted on

4th Day on the wagon

Started with the introduction to CSS folder yesterday and I had a good run through the folder. Read all the attached articles and followed dutifully through the classes. Then came the time for an exercise project.

Great start until I had to /* Give both p's inside the 3rd div a pink background*/
Pretty easy… so I thought… found out after 18 hours of intermittent attempts (I reluctantly went to watch the solution video for the answer though. I must confess).
Alt Text

My first thought was div:nth-child(3) {background: pink}

This apparently only gave all third items in a div pink background. I combed through the article looking for a way out. Went through a host of other articles on MDN and StackOverflow but couldn't figure out a way to do this simple task.

The problem with my approach was SYNTAX. I assumed that the nth-child was the nth-of-type. So, it didn't really matter how much I read until the solution video pointed out that flaw in reasoning, it would almost always have eluded me.

I found the other tasks easier because by then I had read a lot about selectors and seeing what was done in the solution video. I was better prepared to tackle them. I even answered one of the questions differently and better than what the solution video did.

The moral of my story is this:
It's alright to ask for help. Many learners like myself, are eager to learn, so much so, we put pressure on ourselves to retain a lot of information within a short period of time.
Cheating in the traditional sense of it in a learning environment is allowed. In fact, it is important. It's how you can cover ground and get better faster. You don't have to always learn from your own mistake. You learn what to do and what not to do from watching others' work.
This is not to excuse you from trying things out yourself. Just don't spend more time trying to solve a problem that has already been solved.

:)
Ruby

Top comments (2)

Collapse
 
trap_introvert profile image
Adedamola Adeniyi

Good read.

Collapse
 
rubbydevv profile image
Ruby

Thanks, Trap