Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
aldobertoldini
Posts: 3
Registered: ‎12-17-2010
My Device: Not Specified
Accepted Solution

Css support

We have a booking on line system, we are trying to develop a blackberry version but we are not able to display correctly css. In simulator browser everything works normally.

 

Please take a look at www.grottagiustispa.com: when you try to check availability the css isn't loaded, but it is the same as the first page. What's wrong?

 

Thank you

Aldo Bertoldini

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Css support

Hi Aldo,

 

Which version of the BlackBerry device software are you seeing this behavior?  I tested your link on BlackBerry 6 and the availability page works looks like it has CSS being applied to it.

 

I notice that the <link> element on this page is linking to a *.php file instead of a *.css page.  Is that your intent?  I will have to confirm, however I believe that older versions of the BlackBerry browser disallow PHP files from being used in this manner.

 

Sincerely,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
aldobertoldini
Posts: 3
Registered: ‎12-17-2010
My Device: Not Specified

Re: Css support

Hi Adam, many thanks for you reply, I changed style extension to css, but it still does not work. My device is a BlackBerry 9105 v. 5.0.0.989 Platform 6.2.0.54

 

 

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Css support

Hello,

 

I reproduced the behavior you've described using a BlackBerry Pearl 9100 running 5.0.0.994.

 

This tells me that OS 5.0 is not able to recognize the style sheet (actually a PHP disguised as a CSS file) you are referencing from this page.  Reasons for this could have to do with content transcoding (performed by the MDS component of the BlackBerry Web Infrastructure which is used when using the Internet Browser or BlackBerry Browser configuration option) or that the MIME type for this content is incorrect.

 

As a way of verifying this, can you try the following?

 

1) Open the Options menu, and change the "Browser" field in "Browser Configuration" to a value other than 'BlackBerry Browser' or 'Internet Browser' and reload the page.  If you see the CSS renders correctly, the issue has to do with transcoding and the solution is to change your page to use an actual CSS file, rather than a disguised PHP file.

 

2) Can you verify that your PHP page that is dumping out CSS content is also setting its content type to "text/css"?  If not, try doing this, and then reloading the site.  If the CSS renders correctly, then this has solved the problem.  See this page for how to set page content type in PHP: http://php.net/manual/en/function.header.php

 

Sincerely,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
aldobertoldini
Posts: 3
Registered: ‎12-17-2010
My Device: Not Specified

Re: Css support

HI Adam, setting the correct content type header solved it.

 

Thank you

Aldo