Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    7
    Member #
    28897

    Current Rating

    Visual Appeal:
    1.0 out of 5

    Accessibility:
    1.0 out of 5

    Website Speed:
    1.0 out of 5

    Compatibility:
    1.0 out of 5

    Overall Rating:
    1.0 out of 5

    Rate This Site


    Advertisement (login to hide this!)


    You must be logged in to view this site

    I'm new to webdesign and currently still using tables over div's to layout a webpage. I can use CSS to get a rollover effect in my table navigation. Is there a way to use CSS to change the background color for the individual tables? I'm not really wanting to use javascript just CSS. Thanks!

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    td:hover {background-color:#whatever;}
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    I don't think he was asking for a hover effect. If you were, jake, then go with what Ronald said.
    Otherwise, give an id to each table cell, and then use CSS to give that id a background color.
    Example:

    HTML:
    <td id="[COLOR=rgb(51, 153, 102)]cell[/COLOR]">

    CSS:
    #[COLOR=rgb(51, 153, 102)]cell[/COLOR]{
    background-color: #fff;
    }
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  5. #4
    Junior Member
    Join Date
    Aug 2011
    Posts
    7
    Member #
    28897
    Quote Originally Posted by Ronald Roe, post: 216338
    td:hover {background-color:#whatever;}

    Thanks! I will try that!

  6. #5
    Junior Member
    Join Date
    Aug 2011
    Posts
    7
    Member #
    28897
    Quote Originally Posted by George Dolidze, post: 216416
    I don't think he was asking for a hover effect. If you were, jake, then go with what Ronald said.
    Otherwise, give an id to each table cell, and then use CSS to give that id a background color.
    Example:

    HTML:
    <td id="[COLOR=rgb(51, 153, 102)]cell[/COLOR]">

    CSS:
    #[COLOR=rgb(51, 153, 102)]cell[/COLOR]{
    background-color: #fff;
    }
    Thanks for the help. I will try that!

  7. #6
    Junior Member
    Join Date
    Feb 2011
    Posts
    13
    Member #
    26816
    You can use individual ID's or the global td like above. Some other methods are
    • Set a class attribute for multiple TD's: td.myclass { background-color: #CCC; }
    • Set a cell color for certain tables: #myTableId tr td { background-color: #CCC; }
    • Or multiple tables with class attribute: table.myclass tr td { background-color: #CCC; }

  8. #7
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    I get an error message when I try to open it. I'm using Firefox 7.

  9. #8
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Quote Originally Posted by shovenose, post: 216535
    I get an error message when I try to open it. I'm using Firefox 7.
    Isn't FF only up to like 5?
    m3n0tu18 likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  10. #9
    Senior Member DanExcell's Avatar
    Join Date
    Jul 2011
    Posts
    422
    Member #
    28663
    Liked
    76 times
    Encouraging and enabling a noobie to use tables?
    I have gotten into the habit of not judging other designers/developers work, but this is my Microsoft Meandering time so I'm MEANDERING...

    Oh, almost forgot: spammers are gender-less parasites...

  11. #10
    WDF Staff m3n0tu18's Avatar
    Join Date
    Jul 2011
    Location
    Devon, UK
    Posts
    1,467
    Member #
    28473
    Liked
    265 times
    Quote Originally Posted by shovenose, post: 216535
    I get an error message when I try to open it. I'm using Firefox 7.
    *computer voice* Error, Error, Firefox 7 does not exist....Blue screening to save irrelevant data...
    If you like my comments to your thread please click the LIKE button

    Check out my portfolio: Here!
    View my company Facebook Page
    View my company Website

    <<Plrease ignoer my typo's I have isdexlyia>>


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:10 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com