This forum is now read-only. Please use our new forums! Go to forums
display : block; is not working
Oops, try again! Did you remember to set the display property of your <div>s
to block?
my code
div {
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
display : block;
}
what was asked of me
div {
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
/*Add your CSS here!*/
}
Answer 51b690f852f8635865001a00
Try no white space between display
and the colon :
Answer 54be1b75937676d442001671
div { height: 50px; width: 100px; border: 2px solid black; border-radius: 5px; display: block; } The Box Model 2. Taking up place It tells me “Oops try again” over and over again.
1 comments
Thanks for pasting your code. I tested your code on my own exercise and it passed validation. Try refreshing the browser with CTRL f5 ( or CMD r if on a MAC). If it still doesn’t work then your problem is somewhere else and I would have to see the whole code instead of just this little snippet.
Answer 54bef04376b8fe40e800058f
- { border: 1px dashed blue; }
div { height: 50px; width: 100px; border: 2px solid black; border-radius: 5px; display: block; }
#one { background-color: #FF0000; }
#two { background-color: #0000FF; }
#three { background-color: #FFD700; }
#four { background-color: #308014; }
Edited by Tony de Araujo (moderator)
This is the HTML part for 2/25:
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>Result</title>
</head>
<body>
<div id="one"></div>
<div id="two"></div>
<div id="three"></div>
<div id="four"></div>
</body>
</html>
3 comments
I tested your code and it passed for me. I pasted my HTML part for you to test yours to make sure there is nothing wrong with it. Did you try clearing the browser with CTRL f5?
Yes, I’ve cleared the browser. with F5. What should I do? This is the only exersice I left to finish the HTML&CSS course.
CTRL + f5 if on windows, CMD + r if on Mac. If it still fails try passing validation by using a different browser. Or Please paste your HTML section for me to test it since we have not gone that route yet. Or copy my HTML in place of yours just in case…
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
6 comments
still a no go. :( thanks anyway
Thank you! Worked fine! But seems to be a bug in the correction tool!
ok it worked now thanks
This worked for me too. Many Many Thanks! i changed from “display : block;” to “display:block;”
It still doesn’t work for me.
Please paste your code and exercise number on the biggest text window below