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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 1
Registered: ‎08-26-2008
My Device: Not Specified

Coding Issues and Quesions

Hi, I am coding pages for the mobile devices, and running into a lot of limitations with CSS. I am testing with BB 8700G

and I had few questions:

 

1). Do floats work? float:left, float:right?

2). What's the best way to code an image on the left and text floating on the right without wrapping, without tables?

3). I have to code a special character as the button value:, for example:
 <input type="submit" name="button" id="button" value="&oplus;Add Contact" />

and I can't get that &oplus; to show up on a BB. Meanwhile I can get this one to show up no problems:

&radic;

The other ones I am trying to use are:

&lArr; &rArr; &otimes;  

4). Also does padding work?

5). And what's the best statement to use in the head:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtmlmobile10.dtd">

or

<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/
  xhtml1-transitional.dtd">

or

<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/
  xhtml1-strict.dtd">

 

Thank you for your time and for lending your brain. Smiley Happy

- Dima.

Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Coding Issues and Quesions


goldend wrote:

1). Do floats work? float:left, float:right?


I don't know, if I were you I'd try on a simple page.

the essential thing is to put the < div > you want to float:right before the rest of your things.

 


goldend wrote:

2). What's the best way to code an image on the left and text floating on the right without wrapping, without tables?


I gave up those ideas. A simple table is :

  • easy to code
  • easy to maintain
  • easy to render

Unless you're a W3 evangelist, it's better to do one table for formatting rather than 40 lines of embedded divs.


goldend wrote:

3). I have to code a special character as the button value:, for example:
<input type="submit" name="button" id="button" value="&oplus;Add Contact" />

and I can't get that &oplus; to show up on a BB. Meanwhile I can get this one to show up no problems:

&radic;

The other ones I am trying to use are:

&lArr; &rArr; &otimes;

the ones that are allowed without tweaking are these ones :

http://xandrex.free.fr/docs/HTML_char_table.htm

 

so it's be either an image representing your arrow, of a simple &lt;- for the left arrow.

other XML entities require to have a transcodification referentiel or to have a special configuration client-side.

anyway, you should always validate your page on the W3 Validator :

http://validator.w3.org/


goldend wrote:

4). Also does padding work?


I don't know. You should not try and do padding for a small screen browser anyways.

goldend wrote:

5). And what's the best statement to use in the head:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtmlmobile10.dtd">

or

<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

or

<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/html1-strict.dtd">



between XHTML 1.0 Transitional or XHTML 1.0 Strict, you should use strict. Transitional is for lazy developpers.

between XHTML Mobile and XHTML... XHTML Mobile adds some interesting features but as usual, it will take a long time before the majority of small screen browsers are able to comply.

 

So I'd stick with regular XHTML 1.0 Strict if I were you. Easier said than done. (Just do it).




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