RationaleForm Runner has a built-in theme for forms. This page documents how you can change that default. Writing your own CSS Where to put your CSSYou can either:
<xhtml:title>My Form Title</xhtml:title><xhtml:style type="text/css"> #fr-view .fr-grid .fr-grid-content .my-class input.xforms-input-input { width: 8em } </xhtml:style>Styling specific controls You style specific control in your form, say to set the width of an input field, by adding a CSS class on that control. To do so:
form-runner-base.css:
When doing CSS work, make sure to use a tool like Firebug that shows what CSS rules apply to an element. This will be your best friend for CSS development (in general, not only for Orbeon Forms!). Changing the page width Form Runner uses the YUI Grids, and by default uses their #doc4, which has a fixed width of 974px.You can change this to another width supported by YUI Grids by editing the form and adding a width attribute on the <fr:view> element. You can set this attribute to either 750px, 950px, 974px, 1154px, or 100%.However, the Form Runner CSS only supports the #doc4 (974px) width. If you'd like to support another one of the width listed earlier, you'll need to write your own CSS, inline of what has been done for #doc4 in form-runner-base.css.NOTE: Supporting fixed width other than 974px should be relatively easy to do, however supporting 100% in a way that works on all browsers, including IE 6, is much harder to do. Configuring the presentation of automatic PDF outputNOTE: This doesn't apply if you associate a PDF template with a form. This only applies to the automatic PDF output feature of Form Runner. The automatic PDF output feature of Form Runner uses the Flying Saucer library, which is based on HTML and CSS. This means that you can configure the PDF appearance by adding your own CSS to Form Runner, very much in the same way you configure the appearance of Form Runner in your web browser. First, add your own CSS file to the list of Form Runner CSS files, with the oxf.fr.css.uri property.In your CSS file, write CSS specific to the print format, under a section like this:
This way you can write CSS that only impact the appearance of the PDF, not that of the HTML. |