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

New Developer
Posts: 2
Registered: ‎07-21-2009
My Device: Not Specified

BlackBerry mobile web application--background-image for form submit?

First of all, let me mention that this is my first post in this forum (though I have been an avid reader for a couple months now) and I truly appreciate the support of this network.

I am designing a mobile web application for BlackBerry phones running OS 4.5+. (I understand that 4.6 was the big move to webkit and thus greater CSS support, but my project is already defined.) So, I have this problem.. I want to submit a form with an image background and text overlayed. I can not simply add the text to the image because the text is dynamic (I'm using a label). My method renders well on all the web browsers I have tested it on, as well as simulators running 4.6+, but is not working on the BB browser on 4.5--specifically, the background-image and the border attributes are not functioning in my stylesheet.  According to the BlackBerry CSS Reference guide, these two css attributes are supposed to be functional for OS 4.5 (any OS after 3.8, for that matter).

For testing, I am using static text ("Sign In"). And again, in the BB browser, all of the styling works correctly (width, height, color, etc.) EXCEPT the background-image and border-style attributes, so I'm left with a very standard-looking button. Finally, I know that the url is correct because I can use the same background-image line elsewhere in the CSS file and the image renders.

Here is sample markup line: <input id="submit" type="submit" value="Sign In"/>

and the styling:
#submit {
width: 74px;
height: 21px;
background-image: url(signinbutton.png);
border-style: none;
color: white;
font-size: 8pt;
font-family: Arial;
font-weight: 700;

Thanks in advance for your help.
Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: BlackBerry mobile web application--background-image for form submit?

hello hariananth, and welcome to the forum !

about the versions of the browser :
all BlackBerry browsers are based on the proprietary rendering engine. No webkit here now, and no webkit to be expected in the future either.
Webkit is developped on C++, meaning you will find it on C++ operating systems (mainly Apple MaxOSX, Windows Mobile, Symbian S60).
and BlackBerry OS is Java.

the 4.6 and 4.7 are basically the same as 4.5, but with a bit more of dynamic javascript enabled, better HTML box model and some more CSS features supported. I do not know how to help you for your CSS issue. Maybe you have to use a complete URL ?

The search box on top-right of this page is your true friend, and the public Knowledge Base too: