For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2004 > Re: [PEAR] HTML_QuickForm renderer style









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] HTML_QuickForm renderer style
Alexey Borzov

2004-05-27, 11:40 am

Hi!

Alexey Mirkulove wrote:
> Could you please tell me the way to make a style of button in form:
>
> $form->addElement('reset', 'reset', 'RESET',
> 'style=background-color:#9832a1; border-color:#F4F3F5; font: bold 11px
> Tahoma; color: white;');
>
> i'm doing like this but in that case font & font color does not change,
> using Sigma renderer.


It won't change even if you paste this stuff directly into HTML. Use
double quotes:
style="background-color:#9832a1; border-color:#F4F3F5; font: bold 11px
Tahoma; color: white;"
Bertrand Mansion

2004-05-27, 11:40 am

Alexey Borzov wrote:

>Hi!
>
>Alexey Mirkulove wrote:
>
>It won't change even if you paste this stuff directly into HTML. Use=20
>double quotes:
>style=3D"background-color:#9832a1; border-color:#F4F3F5; font: bold 11px=

=20
>Tahoma; color: white;"


I'd also suggest you use an array like this for setting the attributes:

array('style' =3D> 'background-color:#9832a1; border-color:#F4F3F5; font: b=
old
11px Tahoma; color: white;')

But this is bad design:
1. This will not work in every browsers.
2. You should not use inline css for this, but rather use a class.

Bertrand Mansion
Mamasam
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com