how to define properties of table border with css?

Discussion in 'HTML' started by Bernd Meier, Jan 13, 2008.

  1. Bernd Meier

    Bernd Meier Guest

    I defined table.propertiesfortables {color:green; background-color:#FFFF00;
    border="5" solid blue} as CSS.
    I start my table with the tag: <table class=propertiesfortables>

    Font is green and background yellow but I didn't get border lines.
    But if I use table.propertiesfortables {color:green;
    background-color:#FFFF00}
    as CSS and then begin table tag with <table class=propertiesfortables
    border="5" solid blue>
    I get blue border line.

    Why don't I get blue border lines for my table with first example with CSS
    and what have
    I to change to get them with CSS?
    Bernd Meier, Jan 13, 2008
    #1
    1. Advertising

  2. Bernd Meier

    Jeff Guest

    Bernd Meier wrote:
    > I defined table.propertiesfortables {color:green;
    > background-color:#FFFF00; border="5" solid blue} as CSS.


    for one thing that isn't correct CSS.

    try: border: solid blue 5px

    for another, do you want a border around the table or the cells?:

    table.propertiesfortables td{border: solid blue 5px;}

    Also look up border-collapse: collapse

    Styling tables with CSS is a different animal than you think.

    I'm sure there must be a tutorial around somewhere on this.



    > I start my table with the tag: <table class=propertiesfortables>
    >
    > Font is green and background yellow but I didn't get border lines.
    > But if I use table.propertiesfortables {color:green;
    > background-color:#FFFF00}
    > as CSS and then begin table tag with <table class=propertiesfortables
    > border="5" solid blue>


    Good html procedure is to use quotes
    <table class="propertiesfortables"

    Jeff



    > I get blue border line.
    >
    > Why don't I get blue border lines for my table with first example with
    > CSS and what have
    > I to change to get them with CSS?
    Jeff, Jan 13, 2008
    #2
    1. Advertising

  3. Bernd Meier

    J.O. Aho Guest

    Bernd Meier wrote:
    > I defined table.propertiesfortables {color:green;
    > background-color:#FFFF00; border="5" solid blue} as CSS.
    > I start my table with the tag: <table class=propertiesfortables>
    >
    > Font is green and background yellow but I didn't get border lines.


    table.propertiesfortables {
    color:green;
    background-color:#FFFF00;
    border: 5px solid blue;
    }

    As you see you don't use any '=' in CSS, you use the ':' instead.


    --

    //Aho
    J.O. Aho, Jan 13, 2008
    #3
    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. tshad
    Replies:
    0
    Views:
    2,257
    tshad
    Jan 31, 2005
  2. phl
    Replies:
    1
    Views:
    4,343
    Martin Jay
    Jun 8, 2006
  3. Coder
    Replies:
    1
    Views:
    696
    Cowboy \(Gregory A. Beamer\)
    Jun 24, 2006
  4. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    border-color: #003366; border-width: 2px;

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Jul 17, 2006, in forum: HTML
    Replies:
    64
    Views:
    3,521
    Adrienne Boswell
    Jul 30, 2006
  5. Replies:
    3
    Views:
    897
    richard
    Sep 24, 2006
Loading...

Share This Page