SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,388
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    table.inv vs. .inv

    If I have CSS written as <table class="inv" border="1">

    then in my CSS stylesheet does it matter if I begin it as:

    table.inv { or .inv {

    or are both acceptable?

    Thanks!

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,118
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    Using .inv is fine.. It's just the level of specificity that is needed that you may need to change..

    If you have two elements that use that class e.g.

    <table class="inv"></table>
    <div class="inv"></div>

    To distingish between these two elements you could use

    table.inv and div.inv

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,388
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you, that helps!

    Steve


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •