Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.

CSS tutorials

+7 votes
I had no problem going through the html tutorials. I already knew html and CSS before coming here and have built websites with it. However on both CSS tutorials in the first exercises I enter the code that it is asking for but it continues to tell me it's incorrect.  I copy and pasted the code from the exercises and it didn't work.  I also hand typed everything multiple times I still could not get it to work.  I am in windows 7 64 bit, I tried both in IE7 and FF 9.0.1.  I ended up using rgb for setting the color value and it worked however both hex and the color name didn't work as was suggested in the tutorial.

<html>
<head>
<title></title>
<style type="text/css">
body {background-color:green;}
</style>
</head>
<body>
</body>
</html>

This will not validate but it should.
However this will

<html>
<head>
<title></title>
<style type="text/css">
body {background-color:rgb(255,255,255);}
</style>
</head>
<body>
</body>
</html>

I haven't messed with the second tutorial enough to get it working yet but I was having the same issue with not being able to get the correct code to work.  After further investigation is seems this is a underlying issue with some or all of the tutorials that require colors.  Both background-color and color command. However it seems even the first exercise on tutorial 2 will not continue with accurate code, including the code that is copy and pasted from the exercise description.
posted 5 years ago in CSS by friskyding0 (1,940 points)
edited 5 years ago by friskyding0

1 Answer

0 votes
 
Best answer
Thanks for trying out our code.he.net Beta.
I've tried to replicate the issue using the html code above but did not see the issue.
I tested on FF9, IE7, IE9, Chrome and Safari but they all displayed the green background color when I used "body {background-color:green;}"
answered 5 years ago by codeadmin (113,880 points)
Strange, I attempted to do the same code today and it works now.  This was an issue I was having with multiple tutorials and multiple exercises within the tutorials.  I had cleared my history and everything multiple times and tried different browsers with no success. After reading your answer I copy and pasted the same code and it worked.  I dunno whatever it was seems to be resolved for now.  Thanks for the fast reply and whatever magic you did.

Related questions

+10 votes
0 answers
posted 5 years ago in Javascript by resila01 (1,700 points)
+15 votes
1 answer
posted 5 years ago in CSS by freekstegmann (1,920 points)
+19 votes
1 answer
posted 5 years ago in CSS by Mtata D Mtatuz (1,490 points)
+14 votes
0 answers
posted 5 years ago in CSS by Abdulqadir Farhang (260 points)