The 7th lesson of CSS Positioning, topic name Margin is not working


Whenever i click on save and submit code it throws an error stating that "Oops, try again. Did you remember to set the div's margin to auto". The code works fine but doesn't lemme proceed . Below is the code, please lemme know if i am making a mistake.

* {
	border: 1px dashed black;

div {
	height: 50px;
	width: 100px;
	border: 2px solid black;
	border-radius: 5px;
	background-color: #308014;
	margin : auto;


Put margin: auto. You don't have to put space before the : .


that worked thank you.
But i never got an issue for this space i always used to put for a clean look. it always used to skip that.

Thanks again :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.