Need help with a table and CSS

Discussion in 'XML' started by SpreadTooThin, Jun 12, 2010.

  1. I found a nice piece of CSS for my tables in my application.
    I'm just starting out on CSS and want to expand this class

    I need a row at the top of my table with two columns.
    The first is just text "The name of the report"... the last column on
    the row is a bitmap image.
    (I guess it should be twice as high as the table header that is
    defined at the moment....
    There may be more than two columns in the report...

    This is the CSS (In VB script):

    mCSS =_
    "<style type=" +chr(34) + "text/css" + chr(34) + ">" +_
    "#customers" +_
    "{" +_
    "font-family:" + chr(34) + "Trebuchet MS" + chr(34) + ",
    Arial, Helvetica, sans-serif;" +_
    "width:100%;" +_
    "border-collapse:collapse;" +_
    "}" +_
    _
    "#customers td, #customers th" +_
    "{" +_
    "font-size:1em;" +_
    "border:1px solid #98bf21;" +_
    "padding:3px 7px 2px 7px;" +_
    "}" +_
    _
    "#customers th" +_
    "{" +_
    "font-size:1.1em;" +_
    "text-align:left;" +_
    "padding-top:5px;" +_
    "padding-bottom:4px;" +_
    "background-color:#A7C942;" +_
    "color:#ffffff;" +_
    "}" +_
    _
    "#customers tr.alt td" +_
    "{" +_
    "color:#000000;" +_
    "background-color:#EAF2D3;" +_
    "}" +_
    "</style>"
    SpreadTooThin, Jun 12, 2010
    #1
    1. Advertising

  2. SpreadTooThin

    Peter Flynn Guest

    SpreadTooThin wrote:
    > I found a nice piece of CSS for my tables in my application.
    > I'm just starting out on CSS and want to expand this class


    What has this to do with XML?

    ///Peter

    > I need a row at the top of my table with two columns.
    > The first is just text "The name of the report"... the last column on
    > the row is a bitmap image.
    > (I guess it should be twice as high as the table header that is
    > defined at the moment....
    > There may be more than two columns in the report...
    >
    > This is the CSS (In VB script):
    >
    > mCSS =_
    > "<style type=" +chr(34) + "text/css" + chr(34) + ">" +_
    > "#customers" +_
    > "{" +_
    > "font-family:" + chr(34) + "Trebuchet MS" + chr(34) + ",
    > Arial, Helvetica, sans-serif;" +_
    > "width:100%;" +_
    > "border-collapse:collapse;" +_
    > "}" +_
    > _
    > "#customers td, #customers th" +_
    > "{" +_
    > "font-size:1em;" +_
    > "border:1px solid #98bf21;" +_
    > "padding:3px 7px 2px 7px;" +_
    > "}" +_
    > _
    > "#customers th" +_
    > "{" +_
    > "font-size:1.1em;" +_
    > "text-align:left;" +_
    > "padding-top:5px;" +_
    > "padding-bottom:4px;" +_
    > "background-color:#A7C942;" +_
    > "color:#ffffff;" +_
    > "}" +_
    > _
    > "#customers tr.alt td" +_
    > "{" +_
    > "color:#000000;" +_
    > "background-color:#EAF2D3;" +_
    > "}" +_
    > "</style>"
    Peter Flynn, Jun 12, 2010
    #2
    1. Advertising

  3. CSS is really an HTML tool. The only time it's related to XML is when
    HTML with embedded CSS is being generated from XML.

    If there's a comp.text.html group, I'd suggest asking there.

    --
    Joe Kesselman,
    http://www.love-song-productions.com/people/keshlam/index.html

    {} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
    /\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
    Joe Kesselman, Jun 14, 2010
    #3
  4. SpreadTooThin

    Andy Dingley Guest

    On 12 June, 00:53, SpreadTooThin <> wrote:
    > I found a nice piece of CSS for my tables in my application.
    > I'm just starting out on CSS and want to expand this class


    You want
    news://comp.infosystems.www.authoring.stylesheets (for CSS)

    or
    news://comp.infosystems.www.authoring.html (for HTML markup)



    > I need a row at the top of my table with two columns.


    > There may be more than two columns in the report...


    You can't do this in CSS alone, you need to set it in the HTML. Look
    into the HTML colspan attribute



    > (I guess it should be twice as high as the table header that is
    > defined at the moment....


    You probably don't have to define this with CSS, just let the table
    cells expand to contain what they need to.


    > This is the CSS (In VB script):


    Don't do that. You don't need to generate CSS dynamically. If you
    think you do, you're almost certainly wrong. If you have to do this
    (which is pretty darned rare), you're usually better generating the
    dynamic CSS as minimal fragments in HTML style attributes.

    Nor should anyone have to use VBScript. J(ava)Script if you're really
    stuck.
    Andy Dingley, Jun 15, 2010
    #4
  5. On Jun 15, 8:32 am, Andy Dingley <> wrote:
    > On 12 June, 00:53, SpreadTooThin <> wrote:
    >
    > > I found a nice piece of CSS for my tables in my application.
    > > I'm just starting out on CSS and want to expand this class

    >
    > You want
    > news://comp.infosystems.www.authoring.stylesheets  (for CSS)
    >
    > or
    > news://comp.infosystems.www.authoring.html   (for HTML markup)
    >
    > > I need a row at the top of my table with two columns.
    > > There may be more than two columns in the report...

    >
    > You can't do this in CSS alone, you need to set it in the HTML. Look
    > into the HTML colspan attribute
    >
    > > (I guess it should be twice as high as the table header that is
    > > defined at the moment....

    >
    > You probably don't have to define this with CSS, just let the table
    > cells expand to contain what they need to.
    >
    > > This is the CSS (In VB script):

    >
    > Don't do that.  You don't need to generate CSS dynamically.  If you
    > think you do, you're almost certainly wrong.  If you have to do this
    > (which is pretty darned rare), you're usually better generating the
    > dynamic CSS as minimal fragments in HTML style attributes.
    >
    > Nor should anyone have to use VBScript.  J(ava)Script if you're really
    > stuck.


    The html table and css are sent to be sent as an email message.
    I think I'll try the css authoring sites you mentioned.
    Many thanks all
    SpreadTooThin, Jun 15, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    688
    clintonG
    Dec 24, 2004
  2. Replies:
    3
    Views:
    882
    richard
    Sep 24, 2006
  3. Thierry Lam
    Replies:
    23
    Views:
    1,013
  4. Luigi Donatello Asero

    Re: Need help converting a table to div/css

    Luigi Donatello Asero, Sep 28, 2006, in forum: HTML
    Replies:
    0
    Views:
    437
    Luigi Donatello Asero
    Sep 28, 2006
  5. vitay
    Replies:
    8
    Views:
    523
    Stan McCann
    Nov 9, 2006
Loading...

Share This Page