Click here to Skip to main content
15,902,189 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Javascript XMLDOM issue with classic asp Pin
brijraj7-Jun-10 21:46
brijraj7-Jun-10 21:46 
GeneralRe: Javascript XMLDOM issue with classic asp Pin
WoutL7-Jun-10 22:00
WoutL7-Jun-10 22:00 
GeneralRe: Javascript XMLDOM issue with classic asp Pin
brijraj9-Jun-10 0:38
brijraj9-Jun-10 0:38 
QuestionHow to build a full ActiveX file viewing application that embeds into Internet Explorer Pin
Urban Olars7-Jun-10 9:15
Urban Olars7-Jun-10 9:15 
QuestionPostBack Problem Pin
mominafiz7-Jun-10 9:00
mominafiz7-Jun-10 9:00 
AnswerRe: PostBack Problem Pin
enhzflep8-Jun-10 20:09
enhzflep8-Jun-10 20:09 
AnswerRe: PostBack Problem Pin
Rhys Jacob15-Jun-10 1:26
Rhys Jacob15-Jun-10 1:26 
Questiondefining a "color table" in CSS ? Pin
BillWoodruff6-Jun-10 17:25
professionalBillWoodruff6-Jun-10 17:25 
Hi,

I think I am trying to do something here that CSS doesn't allow, but would like to ask, anyway.

Just as CSS enables separation of style from content, I also like the idea that within CSS I could define a color table, and then use the names of those colors in the CSS styles applied to various DOM objects.

I've been studying the W3C CSS spec, consulting various CSS websites, but haven't found any way to do what I want : perhaps it's not possible ?

I have a nice color scheme cooked-up and exported using Petr Stanicek's great ColorSchemeDesigner site[^].

I can insert it into a CSS style sheet like so :

/* generated using http://colorschemedesigner.com/ */
.primary-1 { background-color: #956500 }
.primary-2 { background-color: #624D22 }
.primary-3 { background-color: #4D3400 }
.primary-4 { background-color: #AB7A12 }
.primary-5 { background-color: #AB7E20 }

.secondary-a-1 { background-color: #081865 }
.secondary-a-2 { background-color: #1A2143 }
.secondary-a-3 { background-color: #010A35 }
.secondary-a-4 { background-color: #172B86 }
.secondary-a-5 { background-color: #223386 }

.secondary-b-1 { background-color: #062763 }
.secondary-b-2 { background-color: #192741 }
.secondary-b-3 { background-color: #011333 }
.secondary-b-4 { background-color: #153C83 }
.secondary-b-5 { background-color: #1F4383 }

Where each color is now a "class."

But I can't use those class names as I thought I might :

a:link
{
color: silver;
background-color: .secondary-b-5;
}

a:link
{
color: silver;
background-color: secondary-b-5;
}

The above two examples will have no effect on link color. And I can't find any way to indicate that a:link should somehow "inherit" from the class ".secondary-b-5"

Is there any way to achieve the kind of abstraction I am trying for here ?

thanks, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844

AnswerRe: defining a "color table" in CSS ? Pin
Peace ON6-Jun-10 22:17
Peace ON6-Jun-10 22:17 
GeneralRe: defining a "color table" in CSS ? Pin
BillWoodruff7-Jun-10 15:07
professionalBillWoodruff7-Jun-10 15:07 
AnswerRe: defining a "color table" in CSS ? Pin
Dalek Dave6-Jun-10 22:35
professionalDalek Dave6-Jun-10 22:35 
GeneralRe: defining a "color table" in CSS ? Pin
BillWoodruff7-Jun-10 15:11
professionalBillWoodruff7-Jun-10 15:11 
GeneralRe: defining a "color table" in CSS ? Pin
Not Active7-Jun-10 16:28
mentorNot Active7-Jun-10 16:28 
GeneralRe: defining a "color table" in CSS ? Pin
BillWoodruff7-Jun-10 17:01
professionalBillWoodruff7-Jun-10 17:01 
AnswerRe: defining a "color table" in CSS ? Pin
BillWoodruff7-Jun-10 17:06
professionalBillWoodruff7-Jun-10 17:06 
GeneralRe: defining a "color table" in CSS ? Pin
Dalek Dave7-Jun-10 21:39
professionalDalek Dave7-Jun-10 21:39 
QuestionProblem with html table Pin
Aljaz1115-Jun-10 5:45
Aljaz1115-Jun-10 5:45 
AnswerRe: Problem with html table Pin
Yusuf6-Jun-10 0:49
Yusuf6-Jun-10 0:49 
AnswerRe: Problem with html table Pin
enhzflep6-Jun-10 2:19
enhzflep6-Jun-10 2:19 
QuestionLogin form not working Pin
Gjm4-Jun-10 21:33
Gjm4-Jun-10 21:33 
AnswerRe: Login form not working Pin
Yusuf6-Jun-10 0:54
Yusuf6-Jun-10 0:54 
QuestionCrystal Report in IE8 Pin
PunkIsNotDead4-Jun-10 8:13
PunkIsNotDead4-Jun-10 8:13 
QuestionHow to connect to Ms Access Database? Pin
mdrizwan_12-Jun-10 1:33
mdrizwan_12-Jun-10 1:33 
AnswerRe: How to connect to Ms Access Database? Pin
walterhevedeich2-Jun-10 1:55
professionalwalterhevedeich2-Jun-10 1:55 
GeneralRe: How to connect to Ms Access Database? Pin
mdrizwan_12-Jun-10 2:20
mdrizwan_12-Jun-10 2:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.