1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

CSS Table BG color & Position, border & color

Discussion in 'Web Development' started by Dizzie92, Sep 25, 2007.

  1. Dizzie92

    Dizzie92 New Member

    I've looked around online and I cant find how to change the background color of a table, how to position the table, absolutly, setting the border and its color in CSS. Its making me mad, does ne1 have some css that lets me do this all in one? RGB color is fine, but hex is okay 2. :) If some1 could help me out, that would be great!! Thanks everyone
  2. vareside

    vareside New Member

    There is an easy solution:
    To use these settings for all tables you should put it into the css file. To use it just for one table, add to the table-tag ( <table style=" ... "> ).

    Here the code for CSS file:
    table {
    background: #3B3B3B; //your background-color is #3B3B3B in hex code
    align: center; //the table is in the center of the page
    valign: top; //content is positioned at the top of the table
    border: 1px dotted #000000; //creates a black dotted border of 1px

    Just remove my comments before embedding.