CSS issues in Opera 10?

Forums » Dev.Opera » General Web Development Discussions

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

12. October 2009, 07:57:04

AndersOE

Posts: 1

CSS issues in Opera 10?

Hi all,

I have experienced some changed behaviour in Opera 10 for certain web pages. OSL works perfectly in Opera versions up to 10, and also all other tested browsers (IE, Firefox, Safari). But when testing it in Opera 10 there is too much margin at the top of the page.

If I go to a new tab, exit the browser, start the browser again and go to the OSL tab, the layout is fine. But if I refresh the page, the layout is once again broken. Any ideas on how to fix this? I have tried to replace float: left with overflow: hidden on the .bodyContentInner-selector, but with the same results.

Update: It seems a br-element is inserted between the <html> and <head> elements. It is not visible when viewing the source, but it can be seen when inspecting the DOM using the developer console.

Thanks in advance,
Anders

13. October 2009, 18:11:06 (edited)

simonborn

Posts: 3

exactly same problem here with our website www.dotfly.de

Update: It's the same problem here - mysteriously inserted
tag...

12. October 2009, 21:45:12

tenno-seremel

Shinigami mentat

Posts: 316

It looks fine when Javascript is off. If I turn it on there is a 'margin', however Opera Dragonfly shows a (rogue?) br after html but before head.
=> WAS KI RA WAS YEA ERRA GYUSS VONN MELENAS TES AR YORR
EXEC hymme 2X1/0>>000111001111

13. October 2009, 02:21:37

medelezer

Posts: 1

pittiously i encountered with a kind of simmiler error, though other letters appeared reading the source code. again and again the page did not load and gave an error massage because in front of the <html> tag two letters appeared that were not coded. i warned opera about this, but it seemed they could not reproduce the error.
the error only appeared loading certain pages.
did you meet with this kind of problem, too? what's the solution?
k. gr.,
was

27. October 2009, 23:57:25 (edited)

ScrObot

Posts: 2

I came across this same issue and figured out the source of the problem.

The rogue br tag added between the <html> and <head> tags was being caused by a JavaScript statement that was throwing an error. Check the Error Console to see if there are any JavaScript errors and try eliminating those.

In my case, it was an IE-specific statement (used to help fix IE's background image :hover flickering problem): document.execCommand("BackgroundImageCache", false, true);

Putting the IE-specific statement into a conditional comment cleared the problem up.

27. October 2009, 01:53:22

ScrObot

Posts: 2

And thanks to Haruka aka Seremel for switching on the lightbulb that made me investigate JavaScript errors in the first place. (=

I'm wondering if certain CSS errors could also cause the br tag insertion.

27. October 2009, 09:23:02

tenno-seremel

Shinigami mentat

Posts: 316

And thanks to Haruka aka Seremel for switching on the lightbulb


sherlock
=> WAS KI RA WAS YEA ERRA GYUSS VONN MELENAS TES AR YORR
EXEC hymme 2X1/0>>000111001111

28. October 2009, 08:45:28

simonborn

Posts: 3

Great!

Thanks ScrObot for the solution to this problem.

Now I would have not only to insert some additional comments on our website but also check through some plug-ins we use made by others which do throw errors. Sadly, that will take some time. Anyone got any news on if Opera is working on this issue?

31. October 2009, 02:49:22

Thanks for flagging this, guys - checking with our developers. If you think this is a bug, feel free to file a bug report on https://bugs.opera.com/wizard
Andreas Bovens - Group Leader Developer Relations, Opera Software

28. December 2009, 14:37:20

moroz1999

Posts: 1

I have exactly the same issue.
After executing the following code, some kind of margin/padding appears on the top of Body element:
try 
{
	document.execCommand("BackgroundImageCache", false, true);	
} 
catch(err) 
{
}


As this is a workaround for Internet Explorer 6 background caching problem, I've solved the problem temporarily by adding a following controlling for appName:
if (navigator.appName == "Microsoft Internet Explorer")
{
	document.execCommand("BackgroundImageCache", false, true);	
}

Hope that this helps somebody.

Forums » Dev.Opera » General Web Development Discussions