Margin top, right, bottom, left CSS potioning


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

div {
top margin:20px;
right margin :50px;
bottom margin : 10px;
left margin:5px;
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
background-color: #308014;
}

what is wrong with is code?????
i don't get..


#2

well, top margin doesn't exist, css property's are always on word. but the property you look for is margin-top (and margin-left etcetera)


#3

pliz need help.i dont know why its refusing


#4

me neither, and there is no way to tell without your code. Can i see your code? Preferable full html + css code, next time, will you make your own topic?


#5

here is my code

}
div {
top margin:20px;
right margin :50px;
bottom margin : 10px;
left margin:5px;
}


#6

Hm.. i already answered that in this topic:


#7

so how do we do that.u know i been trying this for 2 days.pliz help.


#8

well, you use the correct css property's (margin-top, margin-left, etcetera) instead of the once you use (top margin, left margin, etcetera), which are not css property's


#9

ohhh ok.let me try it if it will work


#10

still not working.

div {
margin-top:20px;
margin-right :50px;
margin-bottom : 10px;
margin-left:5px;
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
background-color: #308014;
}


#11

its buzzy saying this

Oops, try again. It looks like your top margin isn't 20px.


#12

Can i see the rest of your css code? And also your html code? in pacticular <link> with all his attributes?


#13

ok here its











#14











#15

and all of your css?
if you edit/update your question, leave a reply so i get a notification. Your code is not visible, take the following steps to make your code 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


#16
<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<div></div>
	</body>
</html>

#17

Make sure your browser zoom is set to 100% (ctrl + 0 or cmd + 0 for mac), if after that you still have problems, try a different browser, your code is fine, it could be your browser is sending cached data


#18

ok can u type for me so that i copy and paste it.


#19

Type what? Your code is fine, just switch browser and ensure the zoom is set to 100%, that is not something i can type


#20

but i tryd it refusing.i tried zooming