Results 1 to 3 of 3

Thread: Use of "hashtag" in CSS

  1. #1
    Join Date
    Sep 2008
    Jackson MS

    Use of "hashtag" in CSS

    I have not had to use CSS very often and what I have copied has usually been good enough, but now I am having to come up to speed after inheriting a website. This website: Devenezia round robin theory was my source for my round robin illustration and I used his code from the pink-to-red table
    <STYLE TYPE="text/css">
    TABLE#GIST TD { text-align: center }
    TABLE#GIST TD.border { border: 1px solid black }
    TABLE#GIST TD#i0 { text-align:center;background-color:#9CF;font-weight:bold;border:1px solid black;padding:4px}
    TABLE#GIST TD#i1 { background-color:yellow }
    a.c { margin-left:0.5in;background:#EFE; border:1px solid #60BB60; padding:5px; font-size:80%; font-weight:bold; color:#000;padding:4px}
    a.c:hover { background:yellow }
    a.x { background:url(external.png) center right no-repeat; padding-right: 13px; }
    to create
    <style type="text/css">table#GIST td { text-align: center }
    table#GIST td.border { border: 1px solid black }
    table#GIST td#i0 { text-align: center; background-color: #009CF0; font-weight: bold;
                   border: 1px solid black; padding: 4px }
    table#GIST td#i1 { background-color: black; color: white }
    table#GIST td#i3 { background-color: black; color: white }
    table#GIST td#i5 { background-color: black; color: white }
    table#GIST td#i7 { background-color: black; color: white }
    table#GIST td#i9 { background-color: black; color: white }
    used here: Adding late players to round robin.

    I have not found any other examples of# being used in any other style sheets. Is this interchangable with, say, a period? Any other examples?


  2. #2
    Join Date
    Nov 2006
    Springfield, MO
    Not interchangeable with period (.) known as a CSS class. Hash tags are known as CSS ID's. The main difference is classes can be used on a page multiple times, whereas a ID can only be used once per page. ID's are often used in laying out a page with DIV's.
    Ryan Butler

    Ryan Butler.org

  3. #3
    Join Date
    Sep 2008
    Jackson MS
    Thank you.

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