Css positioning negative values 11/25


#1

hi please help me! I can't get past this level!
Oops, try again. Did you set your

's margin-top to -20px?

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<div style="margin: auto;"></div>
	</body>
</html>

this is my stylesheet btw down there!

* {
	border: 1px dashed black;
}

div {
	height: 50px;
	width: 100px;
	border: 2px solid black;
	border-radius: 5px;
	background-color: #308014;
    border:4px solid;
    color:#FF0000;
    padding:40px;
    margin:-20px, 50px, 10px, 5px;
}

#2

sorry this is my index.html











#3

when you have a property (margin or padding) you can separate the values by spaces:

padding: 10px 20px 30px 40px;

i suggest you do this for your margin

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#4

hi there
i still dont understand :frowning:


#5

you separated your margin-values with comma's:

margin:-20px, 50px, 10px, 5px;

you should separate the margin-values with spaces only, no comma's


#6
  • {
    border: 1px dashed black;
    }

div {
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
background-color: #308014;
border:4px solid;
color:#FF0000;
padding:40px;
margin:-20px 50px 10px 5px;
}


#7

still not working:(
same error


#8

I think you need to specifically use the property provided:

margin-top: -20px;

#9

Css code is fine, could be because of the many request you did, your browser is sending cached data, try a different browser


#10

it works for me fine


#11