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
Developer
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

css style="{background:red;}" tag does not work

The following two tags do not work in chrome/pb browser. Ive been told that this is a chrome bug. Is it a pb bug too or just a missing feature or is there a workaround? Many thanks!

 

<textarea readonly style="{background:red;}">s</textarea>
<textarea readonly style="{background-color:red;}">s</textarea>


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Developer
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

Re: css style="{background:red;}" tag does not work

ok to clarify it works if the style in is the top of the document in the css style sheet stuff but not when it is in the individual elements (ie. i cant change each box to a different colour) please help! thx!


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Regular Contributor
Posts: 81
Registered: ‎03-09-2012
My Device: PlayBook & Bold 9780
My Carrier: n/a

Re: css style="{background:red;}" tag does not work

[ Edited ]

Have you tried assigning css classes?

 

.bg_red { background-color: red;}

 

<textarea class="bg_red"></textarea>

 

Changing the style classes can also be done dynamically from JavaScript...

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

Re: css style="{background:red;}" tag does not work

This could also be a syntax issue?

 

I don't think you need the curley brackets around your style content.

 

<textarea readonly style="background:red;">s</textarea>
<textarea readonly style="background-color:red;">s</textarea>

 

Would also encourage you to separate style from form, and define your CSS outside of your HTML:

 

<style>
   textarea { background:red; }
</style>

...

<textarea readonly>s</textarea>
<textarea readonly>s</textarea>

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.