The css_xhtml theme provides all the basics that the simple theme provides and adds several features.
- Standard two-column CSS-based layout, using
<div>for the HTML Struts Tags (form, textfield, select, etc)
- Labels for each of the HTML Struts Tags, placed according to the CSS stylesheet
- Validation and error reporting
Wrapping the Simple Theme
The xhtml theme uses the "wrapping" technique described by Extending Themes. Let's look at how the HTML tags are wrapped by a standard header and footer. For example, in the textfield template,
controlfooter.ftl templates are wrapped around the simple template.
CSS XHTML theme header
The header used by the HTML tags in the css_xhtml theme is complicated. Unlike the xhtml theme, the CSS theme does not use a
labelposition attribute. Instead, the label position is defined by CSS rules.
Note that the
fieldErrors, usually caused by Validation, are displayed in a
div block before the element is displayed.
CSS XHTML theme footer
Two css_xhtml templates of special interest are
The css_xhtml head template is similar to the xhtml head template. The difference is that CSS is used to provide the layout.
The head includes a style sheet.
<table> element, there are no elements. Instead, the CSS rules for the individual HTML tags are assumed to handle all display logic. However, as noted, client-side validation is still supported.