menu

arrow_back How to write code in such a background?

by
0 votes
How to write code to the background, which consists of 3 blocks?
(Code that I wrote)
.div{
display : inline-block
width : 640px
height : 720px
margin : 0px
}
#one{
background : #c2e6f2
}
.div{
display : inline-block
width : 640px
height: 360px
margin : 0px
}
#two
background : #3d6a9e
}
.div{
display : inline-block
width : 640px
height : 360px
margin : 0px
}
#three{
background : #4c846f
}
.div{
display : inline-block
width : 640px
height : 360px
margin : 0px
}

Is there a mistake?
Thanks in advance for your answers.

4 Comments

Ankhena thanks
and probably height and not long
How to write code to the background

It's all very strange, try to reformulate.
Describe what is not working and attach a picture should look like.
Your code gave jsfiddle.net or counterparts.

Is there a mistake?

there
Use normal editors and they'll all highlight.

1.
.div

Are you sure the div is a class? And why is it 3 times, I think the browser the first time is poorly understood?
2. Between the numbers and px do not write a space
Code on codepen

2 Answers

by
0 votes
Usually begin with the html structure (if it is meant by the word "code"), and then fighting styles. Especially at the initial level of knowledge.

1 comment

KornevaViktoria, with the styles in the css problems with html didn't, thanks for the reply :)
by
1 vote
why .div is repeated?