#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    149
    Rep Power
    13

    Custom CSS tag problems


    I'm trying to add a custom style to my style sheet file, but am encountering a strange error.

    My style sheet is posted below:

    Code:
    div.content
    {
      overflow: auto;
      cursor: default;
      font-family: "Century Gothic", Arial, Helvetica;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 16px;
      padding-right: 5px;
    }
    
    div.title
    {
      text-align: right;
      cursor: default;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 30px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    
    div.siteTitle
    {
      text-align: left;
      cursor: pointer;
      cursor: hand;
      font-style: italic;
      font-variant: normal;
      font-weight: bold;
      font-size: 32px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    div.mainMenu
    {
      text-align: right;
      cursor: pointer;
      cursor: hand;
      border: #FFFFFF;
      border-style: solid;
      border-top-width: 1px;
      border-right-width: 0px;
      border-bottom-width: 0px;
      border-left-width: 0px;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 24px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    div.mainMenuLast
    {
      text-align: right;
      cursor: pointer;
      cursor: hand;
      border: #FFFFFF;
      border-style: solid;
      border-top-width: 1px;
      border-right-width: 0px;
      border-bottom-width: 1px;
      border-left-width: 0px;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 24px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    div.subMenu
    {
      text-align: left;
      cursor: pointer;
      cursor: hand;
      border: #FFFFFF;
      border-style: solid;
      border-top-width: 1px;
      border-right-width: 0px;
      border-bottom-width: 0px;
      border-left-width: 0px;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 24px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    div.subMenuLast
    {
      text-align: left;
      cursor: pointer;
      cursor: hand;
      border: #FFFFFF;
      border-style: solid;
      border-top-width: 1px;
      border-right-width: 0px;
      border-bottom-width: 1px;
      border-left-width: 0px;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 24px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    div.loading
    {
      text-align: center;
      cursor: default;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 18px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    div.link
    {
      cursor: pointer;
      cursor: hand;
    }
    
    div.copyright
    {
      text-align: left;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 8px;
      font-family: "Century Gothic",Arial,Helvetica;
    }
    Seems pretty obvious that I'm applying these styles to <div> layer tags. Now, everything works fine, until I get to the last one. The 'copyright' style. It just won't accept it. I've tried renaming it to other things (thinking that 'copyright' might be a keyword or something), and it still doesn't work. But if I set the class of my <div> tag to any other style defined (such as 'content', for example), it displays it just fine. When I set it as 'copyright', it displays the default font, default size, etc.

    Any ideas why this won't work? Is there a limit to how many styles you can create for a given tag?

    Thanks,

    - coredumped.
  2. #2
  3. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    here... there... mostly here
    Posts
    1
    Rep Power
    0
    Can we have a look at the page? HTML source code?

    I think it work for me but...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    san diego, ca
    Posts
    33
    Rep Power
    13
    No, there is no limit to how many different styles you can use on a type of element, and your CSS has no errors. Have you tried this:

    Code:
    ...
    
    #copyright
    {
      text-align: left;
      font-style: normal;
      font-variant: normal;
      font-weight: normal;
      font-size: 8px;
      font-family: "Century Gothic", Arial, Helvetica;
    }
    
    ...
    
    // In the body of the HTML
    
    <div id="copyright">
      Copyright &copy; 2002 coredumped
    </div>
    If it works there's something wrong with your HTML, otherwise something (that I haven't noticed) is wrong with your CSS. Process of elimination.. let us know what happens.

    Hope that helps.

IMN logo majestic logo threadwatch logo seochat tools logo