www.webdeveloper.com
Results 1 to 3 of 3

Thread: CSS questions & ID in external style sheets

  1. #1
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668

    Cool CSS questions & ID in external style sheets

    Hi! I had a question.... How can I use ID so I can tell my external style sheet to affect only certain objects? I'd like to know how to do this with one table cell, and one image.
    Further more, I don't know any CSS so to make my external style sheet correct I'd like to know what to do. Do I only put in the CSS stuff? You can take a look at my CSS file above and tell me what I'm doing wrong.

    I thank you all for the help!
    -Sunny G
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,251
    You can delete this bit from the end of your stylesheet (all you need is the actual style elements/attributes):
    Code:
    -->
    </style>
    To change the style for just one TD element, assign it an ID as part of the tag:
    HTML Code:
    <td id="special">
    In your style sheet, add an entry for that ID, either as "td#special" or just "#special" for short:
    Code:
    td#special {
      color: #ff0000;
      font-wieght: bold;
      /* or whatever else you want that's different from a "normal" TD element */
    }
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668
    Cool! That's exactly what I needed!
    Thankyou NogDog!
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles