The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
Custom CSS tag problems
Discuss Custom CSS tag problems in the CSS Help forum on Dev Shed. Custom CSS tag problems Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 9th, 2002, 07:39 AM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 149
Time spent in forums: 2 h 49 m 47 sec
Reputation Power: 12
|
|
|
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.
|

December 9th, 2002, 07:51 AM
|
 |
Junior Member
|
|
Join Date: Dec 2002
Location: here... there... mostly here
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Can we have a look at the page? HTML source code?
I think it work for me but...
|

December 9th, 2002, 02:46 PM
|
|
Contributing User
|
|
Join Date: Sep 2002
Location: san diego, ca
Posts: 33
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
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 © 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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|