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 Developer
goldend
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. :smileyhappy:

- Dima.

Guru I
Xandrex
Posts: 18,406
Registered: ‎07-29-2008
My Device: Z30, Playbook, 9320BES
My Carrier: B&You _ 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: