The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Table Background

  • # May 16, 2009 at 5:16 pm

    I was working on a skin for my site and I ran into a table problem.
    All tables take the background appearance of the body background.
    The table is in a DIV called "news_text" which background is #e9e9e9; (from #container)

    I don’t understand why its doing this. Help!

    Note: Here is some of the CSS for that content area

    body,td,th {
    font-family:Arial, Verdana;
    color: #191919;
    body {
    background-color: #F8F8F8;
    #container {
    margin-left: auto;
    margin-right: auto;
    width: 750px;
    text-align: center;
    border: thin solid #999999;
    background-color: #e9e9e9;
    /* Main */
    margin-top: 8px;
    text-align: left;
    width: 450px;
    font-size: 14px;
    background-color: #9b9b9b;
    padding: 1px;
    width: 450px;
    padding: 2px;
    margin-left: 1px;
    padding-bottom: 3px;
    font-size: 13px;
    # May 16, 2009 at 9:00 pm


    That’s pretty simple:

    body,td,th {
    font-family:Arial, Verdana;
    color: #191919;

    In your Selector "body,td,th" commas separate out different HTML elements you will applying the CSS too. So you are applying that background image to all <body> tags, all <td> tags and all <th>s.

    A <td> is the table cell. So every table cell has that same background image….

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed