How to Apply Style to a Spry Table?

I am new to Spry. I am trying to apply some basic style(table width,row height) to a table created with a spry region.
I have tried <table width="400px"> and <table style="width:400px;"> and these didn't work. I've tried creating  a class and <table class="xxxxx"> and that didn't work either. Also <tr height="12px"> as well as <tr style="height:12px;"> and <tr class="xxxx">. Am I missing something really obvious??

<!DOCTYPE HTML>
<html xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style>
#myTable {
    font-size: 0.8em;
    color: #333;
#myTable .headrow {
    color: #FFF;
    background: #009;
    text-align: center;
    margin-bottom: 5px;
#myTable .headrow th {
    font-size: 1.5em;
    font-weight: bold;
    padding: 2px 5px;
#myTable td {
    line-height: 1.5em;
#myTable th.lastname,
#myTable th.firstname {
    width: 150px;
</style>
<script src="SpryAssets/xpath.js"></script>
<script src="SpryAssets/SpryData.js"></script>
<script>var ds1 = new Spry.Data.XMLDataSet("employees.xml", "employees/employee");</script>
</head>
<body>
<div spry:region="ds1">
  <table id="myTable" cellpadding="0" cellspacing="0">
    <tr class="headrow">
      <th spry:sort="lastname" class="lastname">Lastname</th>
      <th spry:sort="firstname" class="firstname">Firstname</th>
      <th spry:sort="phone" class="phone">Phone</th>
      <th spry:sort="username" class="username">Username</th>
      <th spry:sort="@id" class="id">Id</th>
    </tr>
    <tr spry:repeat="ds1">
      <td>{lastname}</td>
      <td>{firstname}</td>
      <td>{phone}</td>
      <td>{username}</td>
      <td>{@id}</td>
    </tr>
  </table>
</div>
</body>
</html>
Have a look here for more info http://www.adobe.com/devnet/dreamweaver/css.html

Similar Messages

  • How to apply style sheets to table layout

    hi i want to apply styles to my table layout region, i gave style sheets which are in OAF myhtml\OA_HTML\cabo\styles but i dint find any changes in my table layout, can any give one give me an idea of how to do it....

    Check the OAF personalization guide for details on custom CSS. It won't be possible for me to summarize the whole thing here.
    --Shiv                                                                                                                                                                                                                                                                               

  • How To apply bold property to the table header

    Hi All,
    Please advice me that how to apply bold property and backgroud color to the table column header.?
    Any help is greatly appreciated.
    Thanks in advance.
    Sathya Rani M

    You can loop through the rows and apply the "fillColor" property for rows. Loop length is the "headerRowCount" of the table.
    In the same loop you could also loop (a loop within a loop) through all cells of a row and set its "texts" obejct, which is an array, to the text style you wish. Or you could apply a paragraph style or a character style, that is pre-defined.
    Uwe

  • How to apply style sheet to design page

    hi all,
    i have a discussion,
    how to apply a style sheet to design page in webdynpro.
    thanks
    vikash

    Hi Vikash,
    Check the below links which will you idea on the same.
    Stylesheet for WDA without integrating in SAP Portal
    Apply custom css to WebDynpro application
    Thanks
    KH

  • How to apply style to submit button

    Hi All,
    I am developing an application in struts where I have multiple buttons on a single form. Each button corresponds to different action to be executed, and to achieve this I have used DispatchAction.
    Since I need to submit the data, I am looking for some ways through which I can put some style on submit button, such as putting an image over the submit button,giving it some border, some color and so on. I want to do this through CSS or if not possible through CSS then as inline style.
    I am using struts-html.tld tag library to render all the HTML controls.
    Any idea how to put images over submit buttons, or if putting an image is not possible then how to have style for it so that the look of submit button changes and the user feels as if it is a graphic button.
    Any help is appriciated.
    Thanks.

    You do realise there is an <html:image> tag which
    generates the html graphical submit button (ie <input
    type="image">) ?
    There are two tags in struts:
    <html:img> - generates an image tag: <img src="...">
    <html:image> - generates a graphical submit buttonYea, I do know this. But the problem is I don't have one submit button in my page. There are mroe than one buttons and each button calls a different method of the Action class. I could not get a way to pass the parameter name and parameter value using
    <html:image> tag.
    To be more clear, I need CRUD operations in one page and they all refer to one Action class. If I use html:image tag, I can't call seperate functions as it will then call the execute method. Also I don't want to have any javascript to call the relevant method from the Action class.
    Is there any way out? I am not a pro in struts, just s beginner, so any help is more than appreciated.
    Thanks.

  • How to apply style sheet (.css) in Weblogic directory listing

    Hi,
    We are migrating a directory listing application from Apache to Weblogic.
    Earlier we did this by Apache httpd.conf entry like below :
    <Directory "/opt/apache/httpd-2.1.9/htdocs/Myreportfolder">
    IndexOptions FancyIndexing FoldersFirst NameWidth=* XHTML
    IndexOrderDefault Descending Date
    IndexStyleSheet "/css/style.css"
    </Directory>
    /opt/apache/httpd-2.1.9/htdocs folder has all it's usual resource files.
    We were able to see documents in "Myreportfolder".
    Now we have moved to Weblogic and using virtual directory mapping as below and we are trying to achieve the same thing:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
    - <wls:container-descriptor>
    <wls:index-directory-enabled>true</wls:index-directory-enabled>
    <wls:index-directory-sort-by>LAST_MODIFIED</wls:index-directory-sort-by>
    </wls:container-descriptor>
    - <wls:virtual-directory-mapping>
    <wls:local-path>/Myreportfolder</wls:local-path>
    <wls:url-pattern>/*</wls:url-pattern>
    </wls:virtual-directory-mapping>
    <wls:context-root>/getreports</wls:context-root>
    </wls:weblogic-web-app>
    We are able to view the reports but we do not get look-and-feel of Apache like directory listing.
    but we encounter below issues:
    1) File/Folder icons are not visible - we want to use style sheets in http header from the response that is returned from weblogic server
    2) Filename is limited to 29 characters when it is showing
    3) Files are not sortable as Descending order - we sorted using tag <wls:index-directory-sort-by>LAST_MODIFIED</wls:index-directory-sort-by> but the latest file is shown at the last
    We are thinking that Weblogic must be having some configuration like Apache httpd.conf where we can apply style sheets (css ).
    We would appreciate af anyone can provide better insight into the issue.
    or is it possible to extend weblogic.servlet.fileservlet class to serve this purpose.
    Thanks & regards,
    Rabi

    Hi Vikash,
    Check the below links which will you idea on the same.
    Stylesheet for WDA without integrating in SAP Portal
    Apply custom css to WebDynpro application
    Thanks
    KH

  • I have function and producer how to apply in form 10g block table

    Dear All
    help me i have create function or package in plsql but i have not understand to apply form developer 10g  block tables so kindly guide me fully
    thank for cooperate and support me

    Hi,
    Do you want to call the function from the Form or do you want to base the block on the function? Please elaborate your question.
    Regards,
    Mark

  • How to apply style to partial text within a tag in xml file

    I have created a webpage using Dreamweaver CS4 Spry Regions. Everything is functioning as expecting, however now I need to apply a style to part of the text. Every occurance of the company name needs to be in italics - the problem is that the company name appears within different parts of the text within a set of tags.
    http://www.certifiedangusbeef.com/private1/sales/facts/index.php
    ie - <description> this is my company name which must appear in italics</description>
    In this example, only "company name" needs to be italicized. We have created an XSL file that applies the italics properly when the XML file is viewed in the browser. But it does not have any effect on the final web page - as though spry is blocking the XSL or we've missed a step in linking all the files together.
    Here's the XSL code:
    <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="facts.xml" --><!DOCTYPE xsl:stylesheet  [
    <!ENTITY nbsp   "&#160;">
    <!ENTITY copy   "&#169;">
    <!ENTITY reg    "&#174;">
    <!ENTITY trade  "&#8482;">
    <!ENTITY mdash  "&#8212;">
    <!ENTITY ldquo  "&#8220;">
    <!ENTITY rdquo  "&#8221;">
    <!ENTITY pound  "&#163;">
    <!ENTITY yen    "&#165;">
    <!ENTITY euro   "&#8364;">
    ]>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="node()|@*">
            <xsl:copy>
                <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="text()[ancestor::description]" name="replace">
            <xsl:param name="pString" select="."/>
            <xsl:choose>
                <xsl:when test="contains($pString,'Certified Angus Beef ®')">
                    <xsl:value-of select="substring-before($pString,'Certified Angus Beef ®')"/>
                    <i>Certified Angus Beef<sup> &reg;</sup> </i>
                    <xsl:call-template name="replace">
                        <xsl:with-param name="pString"
                        select="substring-after($pString,'Certified Angus Beef ®')"/>
                    </xsl:call-template>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$pString"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template match="text()[ancestor::item]" name="replace1">
            <xsl:param name="pString" select="."/>
            <xsl:choose>
                <xsl:when test="contains($pString,'Certified Angus Beef ®')">
                    <xsl:value-of select="substring-before($pString,'Certified Angus Beef ®')"/>
                    <i>Certified Angus Beef<sup> &reg;</sup> </i>
                    <xsl:call-template name="replace">
                        <xsl:with-param name="pString"
                        select="substring-after($pString,'Certified Angus Beef ®')"/>
                    </xsl:call-template>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$pString"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
    </xsl:stylesheet>

    An element attribute is set with the method
    setAttribute(String name,
                             String value)or the
    setAttributeNode(Attr newAttr)method.

  • How to apply style to multiple links?

    I'm a newbie here, so maybe this is a simplistic question.  I am having trouble applying a color style to multiple links on a webpage at the same time.  I have a page setup with a layout similar to the Drudge Report, which posts href links separated by horizontal rule lines.  I want to apply a color style to these links, but I'm finding I have to select each link individually in design mode to apply the style.  When I select multiple links in design mode, the color doesn't apply to the text.  It's time consuming to select each link individually.  I can do this easily in Microsoft Visual Web.  How can I do it in Dreamweaver?

    The best way is to put all related links into a division. 
    Let's say you want to have red links in your #header and white links in your #footer which has a black background.
    CSS, set up two sets of link styles:
    #header a {text-decoration:none}
    #header a:link {color:red}     /**unvisited**/
    #header a:visited {color:gray} /**visited**/
    #header a:hover,               /**on mouse over**/
    #header a:active,              /**on click**/
    #header a:focus                /**on tab key**/
        {text-decoration:underline}
    #footer {background: #000;}
    #footer a {text-decoration:none}
    #footer a:link {color:white}
    #footer a:visited {color:yellow}
    #footer a:hover,
    #footer a:active,
    #footer a:focus 
        {text-decoration:underline}
    HTML:
    <div id="header">
    <a href="some-link.html">Link in the header</a> |
    <a href="some-link.html">Link in the header</a> |
    <a href="some-link.html">Link in the header</a> |
    </div>
    <div  id="footer">
    <a href="some-link.html">Footer link</a> |
    <a href="some-link.html">Footer link</a> |
    <a href="some-link.html">Footer link</a> |
    </div>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • How to apply styles to a column in a datatable based on a condition

    It is like, if some condition is satisfied, i want to apply some style to a column else i have to apply some other style to that column

    HI ,
    Use el expressions to reolve this problem.........
    http://abakalidis.blogspot.com/2007/09/adf-tables-changing-colour-of-negative.html
    go through this link ....it may be usefull to you ......
    Regards
    HAri

  • How to apply Style Sheets to all ComboBoxItems.

    Here in the following code i have referred to stylesheet for each data item. Help me how I can set a stylesheet for all comboboxitems only one time.
    <ComboBox 
                Foreground="Black"
                BorderBrush="Black"
                HorizontalAlignment="Left" Margin="108,280,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource ComboBoxStyl}">
                <ComboBoxItem Content="One" IsSelected="True" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Two" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Three" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Four" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Five" Style="{StaticResource ComboBoxItemStyle1}"/>
            </ComboBox>

    Hi MohanrajKrishnamoorthy,
    I will recommend you create the ComboBox like the following:
    <ComboBox
    Foreground="Black"
    BorderBrush="Black"
    HorizontalAlignment="Left" Margin="108,280,0,0" VerticalAlignment="Top" Width="200">
    <ComboBox.ItemTemplate>
    <DataTemplate>
    //Add style or control in here
    </DataTemplate>
    </ComboBox.ItemTemplate>
    <!--<ComboBoxItem Content="One" IsSelected="True" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Two" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Three" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Four" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Five" Style="{StaticResource ComboBoxItemStyle1}"/>-->
    </ComboBox>
    After that all the ComboBox item will use the same style as you define in the DataTemplate.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Discoverer item type - how to apply style

    Hi.
    On OracleAS 10.0.04, we have links to disco portal & viewer (added an item, chose Discoverer as item type, and typed "viewer" / "plus" in the DiscoItem section).
    These to links does not seem to change according to style changes - always the same font (Time new roman), same size and same color.
    How can we modify this?
    Thanks,
    Dovi.

    This is by no means a good technique for this problem but it
    could work.
    If you can leave a space beween the list item and the anchor
    this will give you a selectable region.
    Then write a JS function which looks through the document on
    page load and removes any spaces at the beginning of li nodes.
    As I said it ain't pretty and you'd best try to alter your
    style sheet to work around your problem, but the above would work
    if you have no other options.

  • How to apply style with grep script to finding question mark

    app.findGrepPreferences = app.changeGrepPreferences = null;      
    app.findGrepPreferences.findWhat = "\?";
    //app.findGrepPreferences.SpecialCharacters = SpecialCharacters.QUESTION_MARK;
    app.findGrepPreferences.appliedParagraphStyle = "myParS";
    app.activeDocument.changeGrep(); 
    app.findGrepPreferences = app.changeGrepPreferences = null;

    Put one more "\" in front of "?".
    and to appy "myParS" style,
    app.findGrepPreferences.appliedParagraphStyle = "myParS"; this line should be changed to app.changeGrepPreferences.appliedParagraphStyle = "myParS";

  • How to apply style to netui control using JS?

    I need to change background of netui textbox on error input.
    Code (JS) for regular HTML control is:
    field.className = field.className.addClass("error");
    However, it doesn't work for netui controls.
    Any ideas?

    Hi,
    If you are using NetUI Text form fields like textbox, you should also assign tagId to these filed to make is accessible from JavaScript
    example:
    <netui:form action="test" tagId="frm" >
    <netui:textBox dataSource="{actionForm.Name}" styleClass="texta" tagId="textbox" />
    </netui:form>
    Then you can refer this field in JavaScript as follows
    document[netui_names.frm][netui_names.textbox].className="textError"
    In these way you can manipulate your NetUI Tags.
    Cheers,
    Tejas Joshi :-D

  • Spry table formatti g

    How do you format a spry table field, such as a numeric field to look like currency with 2 decimal places and commas at the thousands?  I can do this in a regular dynamic table field, but can't find how to do it in a spry table.
    Thanks.
    Judy

    OK.
    Perhaps I misunderstood your question when you said How do you format a spry table field. I erroneously thought you were talking about a Spry field
    My aplogies.
    Ben
    PS In case you do use a Spry input, have a look at the Format, Pattern and Hint properties.

Maybe you are looking for