homepage Welcome to WebmasterWorld Guest from 54.145.183.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

    
opera not recognising CSS stylesheet
londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4182010 posted 7:02 pm on Aug 4, 2010 (gmt 0)

got a real annoying problem that i've only just discovered. if i view my site in opera it appears as a totally unstyled page, as if there is no stylesheet at all.

every other browser i've tried (firefox, IE, chrome, safari) is fine. and the stylesheet is definitely there. i can even link to the stylesheet in opera and get it to display all the rules. it just won't act on them.

the only thing that i can think of is the fact that it has a .php extension rather than .css.
but it's served with the correct header and mime-type is okay, and every other browser recognises it okay, so i can't see why that would be an issue.

i'm stumped. anyone had any similar problems with opera?

 

Hoople

10+ Year Member



 
Msg#: 4182010 posted 2:05 am on Aug 6, 2010 (gmt 0)

Has both the page and css ben run thru a validator? Opera is very strict in its standards interpretation. Does the link to the stylsheet have media="screen" rel="stylesheet" type="text/css ?

Is the page and css both served as the same type (ANSI/UTF-8)?

Beyond this a wild guess of what might help, have a look at Dynamic Cascading Style Sheets [en.wikipedia.org ]

outrun

10+ Year Member



 
Msg#: 4182010 posted 2:14 am on Aug 6, 2010 (gmt 0)

The only times I have problems with opera stylesheets using php is when the server header is incorrect. Is the header set as Content-type: text/css?

Hoople

10+ Year Member



 
Msg#: 4182010 posted 1:53 am on Aug 7, 2010 (gmt 0)

+1 to outrun's suggestion. Worth a check IMHO.

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4182010 posted 8:39 am on Aug 7, 2010 (gmt 0)

this is what i've got at the top of the php (css) file

header("Content-type: text/css; charset:UTF-8");


and when i look at the response headers it says
Content-Type: text/css;charset: UTF-8

so that looks alright

this is how i call it from the html
<link rel="stylesheet" type="text/css" media="all" href="example.php">
cant see anything wrong with that

Mitchman

5+ Year Member



 
Msg#: 4182010 posted 7:22 am on Aug 12, 2010 (gmt 0)

Are you sure the stylesheet is really encoded with utf8 ? No BOMs at the beginning of it or some such? Are you sure no other data is output first? Do you have a link I can look at?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Opera Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved