The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

Background Image Not Displayed

Forums » Opera for Windows/Mac/Linux » Opera browser

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

7. December 2011, 19:02:24

Pesala

Reclining Buddha

Posts: 27343

Background Image Not Displayed

My Website uses a background image. It displays OK in Opera 11.52 and in other browsers, but not in Opera 11.60 or Opera 12.00.

Did I read somewhere about support for a deprecated tag being removed?

BACKGROUND="../AIM_Randomf.jpg"
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

25. January 2012, 10:45:05

Pesala

Reclining Buddha

Posts: 27343

No change in Opera 11.61 final:

Reported bug as DSK-355927
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

25. January 2012, 13:13:08 (edited)

mochikun

Posts: 940

BACKGROUND is still supported, but the validator finds 39 errors and I'm puzzled by 2 BODY opening tags, only one is closed. Page looks fine when I remove 2nd BODY tag:
<BODY BACKGROUND="./AIM_Background.jpg" LINK="#0000FF" VLINK="#800080" TEXT="#000000" TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 bgproperties="fixed" bgcolor="#FFCC99" style="background-attachment: fixed; background-repeat: repeat;">


Bottomline: The bug is in your code. Opera just changed its error handling routine. Don't know if such changes make it into the changelog. To illustrate this you can test with above linked testpage. Add your (simplified) first BODY tag to the code:
<html>
<body background="http://www.aimwell.org/AIM_Randomf.jpg">
<body background="w3s.png">
<h1>Hello world!</h1>
<p><a href="http://www.w3schools.com">Visit W3Schools.com!</a></p>
<p>The background attribute was deprecated in HTML 4, and is not supported in HTML 4.01 Strict DTD or in XHTML 1.0 Strict DTD. Use CSS instead.</p>
</body>
</html>

Opera 11.52 processes the first tag and ignores the second, Opera 11.60 ignores the first and processes the second, IMHO the better policy.

31. January 2012, 15:30:07

Opera Software

Rijk

I was here

Posts: 4117

Opera 11.6 is the first Opera version to use the HTML5 parsing rules, which is likely related to this change in behavior. But both the BODY elements have the background image, the property shows up in Dragonfly, and the image shows up in other browsers that also use the HTML5 parsing rules, so this could be considered a bug in Opera.
"The real issue is about design: designing things that have the power required for the job while maintaining understandability, the feeling of control, and the pleasure of accomplishment." Don Norman
Tweak blog

31. January 2012, 21:33:21

XP1

XP1

Posts: 875

Originally posted by Rijk:

Opera 11.6 is the first Opera version to use the HTML5 parsing rules, which is likely related to this change in behavior. But both the BODY elements have the background image, the property shows up in Dragonfly, and the image shows up in other browsers that also use the HTML5 parsing rules, so this could be considered a bug in Opera.

@mochikun did some tests here:
http://my.opera.com/community/forums/topic.dml?id=1289622

Opera 11.6x is the only one that behaves this way compared to many other browsers.

1. February 2012, 16:59:14

nickbernier

Posts: 1

I'm having the same problem with a site I'm currently developing.

The issue for me is standard <IMG> tags not displaying.

The only thing I found was that I had optimized my images using the Mac tool ImageOptim.

Every other browser on all 3 platforms I tested worked fine with the optimized images.

I reverted back to the standard Photoshop "Save for Web" files and voila, works like a charm on Opera.

2. February 2012, 11:02:27

Pesala

Reclining Buddha

Posts: 27343

Originally posted by Rijk:

the image shows up in other browsers that also use the HTML5 parsing rules, so this could be considered a bug in Opera.

Thanks for the reply. I missed it earlier.
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

Forums » Opera for Windows/Mac/Linux » Opera browser