CSS class in XForms ? [3]

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CSS class in XForms ? [3]

Robert Kirkpatrick
Hi,

I can't define a style like input.red for an XForms control like <input class="red">.
See an example below; no red color is displayed.
I test with FF 2.0.0.6 and Mozilla XForms 0.8.0.3.

Thx for any help.
Robert.

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:f="http://www.w3.org/2002/xforms" xmlns:a="urn:test.eridan.net">
        <head>
                <title>XForm test</title>
                <style type="text/css">
@namespace xf url("http://www.w3.org/2002/xforms/");

input.red { color: red }

label { color: blue; width: 60px; }
                </style>
                <f:model xmlns:ev="http://www.w3.org/2001/xml-events">
                        <f:instance id="data">
                                <a:data>
                                        <a:name>Jim</a:name>
                                        <a:org>public</a:org>
                                </a:data>
                        </f:instance>
                        <f:submission id="save" action="service.asmx/save" ref="instance('data')" method="post"
includenamespaceprefixes="a"/>
                </f:model>
        </head>
        <body>
                <h1>form test</h1>
                <ol>
                        <li>
                                <f:input ref="//a:name" class="red">
                                        <f:label>name:</f:label>
                                </f:input>
                        </li>
                        <li>
                                <f:input ref="//a:org">
                                        <f:label>org:</f:label>
                                </f:input>
                        </li>
                </ol>
                <f:submit submission="save">
                        <f:label>Submit</f:label>
                </f:submit>
        </body>
</html>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: CSS class in XForms ? [3]

Mark Seaborne-3
Hi,

Try:

xf|input.red .xf-value { color: red ;}

and your namespace declaration needs to be
@namespace xf url("http://www.w3.org/2002/xforms");


All the best

Mark

Mark Seaborne
Senior Standards Architect
PicoForms
web:    http://www.picoforms.com
e-mail: [hidden email]
tel: +44 131 2080031
mobile:  +44 787 2180215

On Mon, 17 Sep 2007 12:09:32 +0200, Eridan wrote:

> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:f="http://www.w3.org/2002/xforms" xmlns:a="urn:test.eridan.net">
> <head>
> <title>XForm test</title>
> <style type="text/css">
> @namespace xf url("http://www.w3.org/2002/xforms/");
>
> input.red { color: red }
>
> label { color: blue; width: 60px; }
> </style>
> <f:model xmlns:ev="http://www.w3.org/2001/xml-events">
> <f:instance id="data">
> <a:data>
> <a:name>Jim</a:name>
> <a:org>public</a:org>
> </a:data>
> </f:instance>
> <f:submission id="save" action="service.asmx/save"
> ref="instance('data')" method="post"
> includenamespaceprefixes="a"/>
> </f:model>
> </head>
> <body>
> <h1>form test</h1>
> <ol>
> <li>
> <f:input ref="//a:name" class="red">
> <f:label>name:</f:label>
> </f:input>
> </li>
> <li>
> <f:input ref="//a:org">
> <f:label>org:</f:label>
> </f:input>
> </li>
> </ol>
> <f:submit submission="save">
> <f:label>Submit</f:label>
> </f:submit>
> </body>
> </html>

_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: CSS class in XForms ? OK

Robert Kirkpatrick
In reply to this post by Robert Kirkpatrick
Thanks Mark.
Robert.

Mark Seaborne a écrit :

> Hi,
>
> Try:
>
> xf|input.red .xf-value { color: red ;}
>
> and your namespace declaration needs to be
> @namespace xf url("http://www.w3.org/2002/xforms");
>
>
> All the best
>
> Mark
>
> Mark Seaborne
> Senior Standards Architect
> PicoForms
> web:    http://www.picoforms.com
> e-mail: [hidden email]
> tel: +44 131 2080031
> mobile:  +44 787 2180215
>
> On Mon, 17 Sep 2007 12:09:32 +0200, Eridan wrote:
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:f="http://www.w3.org/2002/xforms" xmlns:a="urn:test.eridan.net">
>> <head>
>> <title>XForm test</title>
>> <style type="text/css">
>> @namespace xf url("http://www.w3.org/2002/xforms/");
>>
>> input.red { color: red }
>>
>> label { color: blue; width: 60px; }
>> </style>
>> <f:model xmlns:ev="http://www.w3.org/2001/xml-events">
>> <f:instance id="data">
>> <a:data>
>> <a:name>Jim</a:name>
>> <a:org>public</a:org>
>> </a:data>
>> </f:instance>
>> <f:submission id="save" action="service.asmx/save"
>> ref="instance('data')" method="post"
>> includenamespaceprefixes="a"/>
>> </f:model>
>> </head>
>> <body>
>> <h1>form test</h1>
>> <ol>
>> <li>
>> <f:input ref="//a:name" class="red">
>> <f:label>name:</f:label>
>> </f:input>
>> </li>
>> <li>
>> <f:input ref="//a:org">
>> <f:label>org:</f:label>
>> </f:input>
>> </li>
>> </ol>
>> <f:submit submission="save">
>> <f:label>Submit</f:label>
>> </f:submit>
>> </body>
>> </html>
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms