Exercise 4 question


#1

I have completed this exercise however I have a question.

This is the CSS which gives me the correct answer e.g:It draws the blue box around everything.

*{
border: 3px dashed #3A5FCD;
}

However when I add the color attribute to it the result changes so that only the top level divs become blue not everything. Why is this?

*{
border: 3px dashed; color: #3A5FCD;
}

Thanks


#2

Not to bump my own thread but for the sake of answering my own question. It appears that the * value is overridden by the p selector in terms of specificity.


#3

there are two proper ways to define a border:

border: 3px dashed #3A5FCD;

or with individual properties:

border-width: 3px;
border-style: dashed;
border-color: #3A5FCD;

color will also color the text and stuff, not only the border


#4

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.