Bug Tracker

Opened 8 years ago

Closed 8 years ago

#9765 closed bug (worksforme)

HTML background color reset to default (white) in Opera

Reported by: joelkinzel@… Owned by:
Priority: low Milestone: 1.next
Component: support Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

jQuery Version: 1.6.2 / latest from CDN
Browser Version: Opera 11.50

Consider the following code:

<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Some Page</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
    <style type="text/css">
		html {
			background: #ccc;
		}
	</style>
</head>
<body>
	<p>This is some text. Blah blah blah.</p>
</body>
</html>

Expected Behavior: Background would be grey.
Observed Behavior: Background is white.

You can also test this with XHTML 1.0 Strict like so:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Untitled Document</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
    <style type="text/css">
		html {
			background: #ccc;
		}
	</style>
</head>
<body>
	<p>This is some text.</p>
</body>
</html>

JSFiddle Example: http://jsfiddle.net/PDb8z/

The same result as above can be observed.

Change History (1)

comment:1 Changed 8 years ago by timmywil

Component: unfiledsupport
Priority: undecidedlow
Resolution: worksforme
Status: newclosed

I am not seeing this behavior in Opera 11.50. This was a problem with jQuery 1.6.1, but the background is gray for me in 1.6.2. Also, I recommend putting jQuery (and all javascript in the future) at the bottom of the body for better performance. The page is blocked until jQuery is loaded so it took a few seconds for it to get to the background color.

http://jsfiddle.net/timmywil/PDb8z/1/

Note: See TracTickets for help on using tickets.