3- inline-block (CSS Positioning)


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/web-beginner-en-6merh/0/3?curriculum_id=50579fb998b470000202dc8b

<In what way does your code behave incorrectly? Include ALL error messages.>
Oops, try again.
Did you remember to set the display of your

s to inline-block? ```

Replace this line with your code.

<do not remove the three backticks above>

#2

Please paste in your code so we can help you


#3

Thank you pls find below the HTML code

Result
  • {
    border: 1px dashed blue;
    }

div {
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
/Add your CSS here!/
div {
display: inline-block;
}

#one {
background-color: #FF0000;
}

#two {
background-color: #0000FF;
}

#three {
background-color: #FFD700;
}

#four {
background-color: #308014;
}
The CSS code:


#4


#5

why do you need add the display property + value in one css selector? Anyway, your first div css selector is missing a closing curly bracket (})


#6

Thanks that helped, the upper part of the CSS code was system generated (above the /Add your CSS here!/) and missing the curly bracket (}). Problem solved by adding it. This is was probabaly causing the error.


#7

For further reference, here’s how to format your code correctly: