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
Posts: 4
Registered: ‎08-11-2008
My Device: Not Specified

Line breaks ignored and weird table behavior

It seems that line breaks (<br />) are ignored in the Blackberry Browser. I've resorted to inserting <hr /> and then hiding them to achieve the same purpose... why is this?

 

Also, tables are supported, but they behave differently in different BB browsers/phones...

 

I am trying to simply float some text left and some text right, on the same line... but floats were ignored and table alignment is also ignored.

 

<table width="100%">

<tr>

<td align="left">some text</td>

<td align="right">other text</td>

</tr>

</table>

 

That code displays either like this: some text other text (not aligned correctly)

or

like this: 

some text

                            other text (knocked down to next line, but aligned correctly)

 

 

Does anybody have any insight for me?

 

Thanks

BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Line breaks ignored and weird table behavior

The BlackBerry Browser can ignore line breaks in an attempt to display more data to the user.  This will vary based on the browser version and rendering mode being used (Page View, Column View or Mobile View).

 

Is table support enabled on the BlackBerry handhelds you are testing with?  You can view this setting by launching the browser, selecting Options from the menu and clicking on Browser Configuration.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 4
Registered: ‎08-11-2008
My Device: Not Specified

Re: Line breaks ignored and weird table behavior

Thanks for the explanation.

Now, correct me if I'm wrong, but there's no way to know whether or not a Blackberry has CSS turned on, or HTML tables turned on, etc. right?
BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Line breaks ignored and weird table behavior

[ Edited ]

You can check the accept headers of the HTTP request for this.  Look for text/css” for CSS and  “application/x-javascript” for JavaScript.

 
Message Edited by MSohm on 09-11-2008 02:40 PM
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Line breaks ignored and weird table behavior


jackbishop1 wrote:

It seems that line breaks (<br />) are ignored in the Blackberry Browser. I've resorted to inserting <hr /> and then hiding them to achieve the same purpose... why is this?


Hello,

the br > element works fine on my 4.2 browser. Do you have an example online ?



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 4
Registered: ‎08-11-2008
My Device: Not Specified

Re: Line breaks ignored and weird table behavior

Well actually, they are not ignored, but if there are multiple <br /> then it will only give me 1 line break, not multiple... maybe this is the proper behavior, not sure...
Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Line breaks ignored and weird table behavior

[ Edited ]
multiple br >elements work fine for me. If you give us your online example it will be easier to help you.
Message Edited by Xandrex on 09-13-2008 01:12 AM



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Member
Posts: 2
Registered: ‎05-28-2011
My Device: 8310
My Carrier: Rogers

Re: Line breaks ignored and weird table behavior

I'm having the same problem. I'm a novice web designer and I used 5 <br /> elements to push the content down below my header. My header is just set as the site's background. 

 

When I view the site on any blackberry, the browser does not read my <br /> elements and therefore the content gets pulled up to the top and covers the header.

 

I will be building a new template soon but I need this to be functional on BBs until then.

 

Here's the website URL: http://ctt-telcom.ca

Thanks,

 

Dave

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

Re: Line breaks ignored and weird table behavior

@str8talk
your website seems fine to me on BlackBerry browser 5, except the fact that some links are in same color as regular text.



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