This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by alexax
over 8 years

Did you remember to give your div a height of 50px? Can't get past error

Hi I see others have had same problem. I’m using Chrome and have tried displays from 60 to 120% (mainly the 100% suggested) but no joy. Maybe I’m missing something here – I hope:

/Start adding your CSS below!/ #div { height: 50px; width: 120px; border-color: #6495ED; background-color: #BCD2EE; border: 2px solid red; }

Thanks! I might have to go try this on my old ubuntu laptop!

Answer 5608fcf0d3292f55aa0002ac

0 votes

Permalink

when you use #div as css selector, you tell css: i have a html element with id div. Are you sure you have that? i would just use div as css selectors so it targets all html <div> elements.

points
Submitted by stetim94
over 8 years

4 comments

stetim94 over 8 years

this will leave you with a border-color issue, but i am sure you can figure that out

alexax over 8 years

Thanks so much for this! Yes, I guess I shouldn’t have #div just div.

stetim94 over 8 years

yes, you should have div. You’re welcome

khodgdon0001 over 8 years

how do you answer the border-color issue

Answer 560a48a9d3292f3991000222

0 votes

Permalink

well, there are two ways to write the border property:

border: 4px dashed red;

or:

border-width: 4px;
border-style: dashed;
border-color: red;

alexax almost did it right, but had border (with 3 values) and border-color. bad combination. you shouldn’t be using border and border-color (i used different values for this examples, otherwise you just copy and paste)

points
Submitted by stetim94
over 8 years