xforms and CSS not in sync?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ClarkePeters
    New Member
    • Dec 2006
    • 14

    #1

    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.

    Code:
    <?xml version="1.0" ?>
    
    <html xmlns="http://www.w3.org/1999/xhtml" 
         xmlns:xf="http://www.w3.org/2002/xforms">
        <head>
          <link href="zstyle.css" rel="stylesheet"/>
          <title>XForms textarea for essay</title>
          
          <xf:model>
             <xf:instance xmlns="">
                   <essay>Type your essay here.</essay>
             </xf:instance>
          </xf:model>
        </head>
    
        <body>Type here. <br />
             <xf:textarea ref="/essay">
                <xf:label></xf:label>
             </xf:textarea>
            
        </body>
    </html>
    And here's the style sheet.

    Code:
    @namespace html url(http://www.w3.org/1999/xhtm);
    @namespace xf url(http://www.w3.org/2002/xforms);
    
    body 
          { margin-left: 2em;    margin-right: 2em; 
             border-width: 2em;   border-color: blue; 
             background-color: gray;   color: white; 
           }
    
    textarea 
          { font-family: sans-serif; 
             height: 500px; width: 90%; 
           }
    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.
  • AricC
    Recognized Expert Top Contributor
    • Oct 2006
    • 1885

    #2
    I don't know much about xforms but to solve your border problem use this <element style="border: 1px solid green"

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      <link href="zstyle.cs s" rel="stylesheet " type="text/css" />

      My XML is rusty; especially with regards to using it with xhtml.

      Comment

      • ClarkePeters
        New Member
        • Dec 2006
        • 14

        #4
        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 :)

        Comment

        • AricC
          Recognized Expert Top Contributor
          • Oct 2006
          • 1885

          #5
          Originally posted by ClarkePeters
          Thanks for taking the time to respond you guys :)
          We love answering questions please ask more. What are you writing this app in? PHP?

          Comment

          • ClarkePeters
            New Member
            • Dec 2006
            • 14

            #6
            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. :)

            Comment

            • AricC
              Recognized Expert Top Contributor
              • Oct 2006
              • 1885

              #7
              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

              Comment

              • ClarkePeters
                New Member
                • Dec 2006
                • 14

                #8
                FYI anyone who's interested, styling in xforms/css, I found this to work for my borders (this is the entire css file):
                Code:
                @namespace html url(http://www.w3.org/1999/xhtm);
                @namespace xf url(http://www.w3.org/2002/xforms);
                
                body 
                      {margin-left: 2em;   margin-right: 2em; 
                       border-left:solid 10px blue;    
                       background-color: gray;   color: white; }
                
                textarea 
                      { font-family: sans-serif; height: 500px; width: 90%; }

                Comment

                Working...