Jump to content
Killersites Community
SamDave

alternative solution to css question?

Recommended Posts

Recently joined the IWDC and regard it as the best money I've ever spent on web dev training.

Just wondering if there's a possible alternative solution to one of the questions in the Beginners CSS module.

Chapter 5, lesson11 (CSS navbars) question 2.

Correct answer is

a {

width: 50px;

display: block;

}

but would 

a {

display: block;

width: 50px;

}

also be valid ? (currently it's marked as incorrect).

Excellent course.

Thanks for all that you're teaching me, Stef.

All the Best for the year ahead.

Share this post


Link to post
Share on other sites

To add my 2 cents worth:

Order only matters if you're addressing the same thing twice. Then the directions furthest down will apply.

Now, addressing the same thing twice doesn't really make sense, but sometimes, it happens that one specifies something further down again, and then cannot understand why an earlier spec just isn't working.

I wished I could think of a good example.......

 

Share this post


Link to post
Share on other sites

Thank You both.

Now I look again at the question I can see there was kind of a hint that the line I needed to add should go under the one that was already there. Being the awkward kind, I just had to add the line ABOVE the existing one. :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×