Recently, while testing internal stylesheets in the latest version of Chrome, I encountered a peculiar bug that caused my code to break.
Strangely enough, any comments placed before background-color:rgb(51,51,51) seemed to trigger the failure of the code.
Below is an example of the code where the background color doesn't change:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8>
<style>
body {
width:100%; <!--browser screen must be fixed width-->
height:100%; <!--and height-->
margin:0px; <!--removes uneven margin added to row's margins-->
background-color:rgb(51,51,51); <!--note that height and width must be specified to work-->
}
</style>
</head>
<body>
<h1>
Headline
</h1>
</body>
</html>
And here is another example where the background works correctly:
<html lang="en">
<head>
<meta charset="utf-8">
<style>
body {
background-color:rgb(51,51,51); <!--note that height and width must be specified to work-->
width:100%; <!--browser screen must be fixed width-->
height:100%; <!--and height-->
margin:0px; <!--removes uneven margin added to row's margins-->
}
</style>
</head>
<body>
<h1>
Headline
</h1>
</body>
</html>
It is important to note that the comments might not align with the code (I removed extra code but left the comments). This situation has left me puzzled - what exactly could be causing this issue? Where did I go wrong?