Bug Tracker

Modify

Ticket #9765 (closed bug: worksforme)

Opened 23 months ago

Last modified 23 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 23 months ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to worksforme
  • Status changed from new to closed
  • Component changed from unfiled to support

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/

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.