473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

xforms and CSS not in sync?

Can anyone tell me why my CSS style sheet isn't styling my xhtml (using xforms)? I'm using firefox 1.5.0.8 with the xforms extension.

Here is the xhtml, it's only a single text area for input.

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" ?>
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml" 
  4.      xmlns:xf="http://www.w3.org/2002/xforms">
  5.     <head>
  6.       <link href="zstyle.css" rel="stylesheet"/>
  7.       <title>XForms textarea for essay</title>
  8.  
  9.       <xf:model>
  10.          <xf:instance xmlns="">
  11.                <essay>Type your essay here.</essay>
  12.          </xf:instance>
  13.       </xf:model>
  14.     </head>
  15.  
  16.     <body>Type here. <br />
  17.          <xf:textarea ref="/essay">
  18.             <xf:label></xf:label>
  19.          </xf:textarea>
  20.  
  21.     </body>
  22. </html>
And here's the style sheet.

Expand|Select|Wrap|Line Numbers
  1. @namespace html url(http://www.w3.org/1999/xhtm);
  2. @namespace xf url(http://www.w3.org/2002/xforms);
  3.  
  4. body 
  5.       { margin-left: 2em;    margin-right: 2em; 
  6.          border-width: 2em;   border-color: blue; 
  7.          background-color: gray;   color: white; 
  8.        }
  9.  
  10. textarea 
  11.       { font-family: sans-serif; 
  12.          height: 500px; width: 90%; 
  13.        }
as it is, the textarea formats to the appropriate size, but if I try to do xf|textarea, I lose the style and get the small default size.

also, the borders don't work no matter what I do. All else seems ok.
Dec 21 '06 #1
7 2099
AricC
1,892 Expert 1GB
I don't know much about xforms but to solve your border problem use this <element style="border: 1px solid green"
Dec 21 '06 #2
drhowarddrfine
7,435 Expert 4TB
<link href="zstyle.css" rel="stylesheet" type="text/css" />

My XML is rusty; especially with regards to using it with xhtml.
Dec 21 '06 #3
I don't know much about xforms
My XML is rusty; especially with regards to using it with xhtml.
Yeah, me too. I wasn't sure whether to post here or in XML but I noticed that there are not too many responses in xml forum.
But since Xforms will soon be the future standard for Xhtml, I thought this would be a good place to post.
I need to learn Xforms because I don't want to redo my whole web application a couple years down the road, but I'm finding it's a bit tricky. There are no really good books or tutorials, they are either too basic or too extreme, and none of them help you understand how to integrate CSS or XSLT with Xhtml and Xforms.

My web app will be an open source distance education app so I hope it'll be around a while. Ok, now I'm just venting :) , must get back to work. Thanks for taking the time to respond you guys :)
Dec 21 '06 #4
AricC
1,892 Expert 1GB
Thanks for taking the time to respond you guys :)
We love answering questions please ask more. What are you writing this app in? PHP?
Dec 21 '06 #5
What are you writing this app in? PHP?
Yes, I am. You must be a mind reader :).

I want to use Xhtml, xforms, xml, and PHP (without MySQL). All data will be stored in xml files.

My problem is that I've done some basic programming and relational database building in the long past, and I am just now getting my feet wet in xml, xforms, and PHP. So I should have lots of questions and will probably be heading to the PHP forum soon. :)
Dec 21 '06 #6
AricC
1,892 Expert 1GB
Ronverdonk hangs out in the PHP forum he's a guru. I've been reading up on this, check it out if your wanting to do a DB PHP page with Javascript.

HTH,
Aric
Dec 22 '06 #7
FYI anyone who's interested, styling in xforms/css, I found this to work for my borders (this is the entire css file):
Expand|Select|Wrap|Line Numbers
  1. @namespace html url(http://www.w3.org/1999/xhtm);
  2. @namespace xf url(http://www.w3.org/2002/xforms);
  3.  
  4. body 
  5.       {margin-left: 2em;   margin-right: 2em; 
  6.        border-left:solid 10px blue;    
  7.        background-color: gray;   color: white; }
  8.  
  9. textarea 
  10.       { font-family: sans-serif; height: 500px; width: 90%; }
Dec 27 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jonathan | last post by:
Does anyone know if it's possible to do the following: I currently have an XML schema set up, part of which includes an enumerated datatype (based on string) giving a list of values that I want...
2
by: Will | last post by:
I have been having problems validating an XForms document against the XForms schema located at http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd. I have reduced the XForm to its bare bones...
2
by: donaldevans_net | last post by:
I have a site that works well with others browsers. I'm getting complaints about IE5.2.3 that my layers are over lapping. I used XFORMS in my programming can you help me?
0
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance...
0
by: Brian | last post by:
However can ask the following questions (or provide a solution) will be dubbed hero of the year: Is it possible to generate an XForms document automatically from an XML Schema document, so that...
9
by: jazzslider | last post by:
I have a headache. I've done a LOT of research lately into XForms, and I am thoroughly convinced that a good implementation of this technology would help me immensely in converting my...
1
by: spark86 | last post by:
I currently have an xform where I'm trying to have the user input first and last name and then when it submits it goes to a file with the path first_last.xml. Here is what I have currently: ...
2
by: li72 | last post by:
Hi. I’m new to XForms society and struggling with a basic concepts. However, I’m trying to transform an xml doc into XForms using XSLT. The browser renders the Xforms just fine but there is no...
0
by: li72 | last post by:
As you can see in binding part, the node<age /> should be returned as a calendar or any form of date picker instead of an input box. In addition, none null values submission is not achieving. I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.