M
M
Mary Zharikova2018-02-05 14:48:34
css
Mary Zharikova, 2018-02-05 14:48:34

How to write code for such a background?

How to write code for a background that consists of 3 blocks?
(Code 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
}
Are there any mistakes here?
Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Alekseev, 2018-02-05
@shure348

why is the .div repeated?

N
NaN, 2018-02-05
@KornevaViktoria

Usually, html is written first - the structure (if that is what is meant by the word "code"), and then styles are added. Especially at the initial level of knowledge.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question