Re: HTML_QuickForm renderer style

From: Date: Thu, 27 May 2004 14:02:33 +0000
Subject: Re: HTML_QuickForm renderer style
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12760@lists.php.net to get a copy of this message
Alexey Borzov wrote: >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;" I'd also suggest you use an array like this for setting the attributes: array('style' => 'background-color:#9832a1; border-color:#F4F3F5; font: bold 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

« previous php.pear.general (#12760) next »