|
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
|
|
|
|
|
I have little knowledge about css class.
But you can try pseudo class of css.
Css Pseudo Classes[^]
If this one does not help you, I do not think there is any other way
to satisfy your requirement.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thanks, Jinal, for your reply. I've gone through the CSS pseudo-classes, and, while there are many interesting things in there, I am afraid that addressing this issue is not implemented in any of them.
best, 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
|
|
|
|
|
It may be that is is failing because it is being defined 'Inline'.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Hi Dave,
Thanks for your reply. Even if I put the "color-definition" classes in another CSS file, and load it on the page before the CSS file that attempts to use them, I'm afraid it won't make any difference.
I do think this is just not possible, and that CSS, by design, has no equivalent to a "named variable" which can be expressed in CSS, and then used by CSS.
I'm just lazy, and don't want to go through a bunch of HMTL sticking in "class='***' "
best, 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
|
|
|
|
|
Maybe this will help
CSS Variables[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark,
I've read your article; it's excellent, and I appreciate your response.
In this case I'm not working with ASP.NET. I am wondering if there is a way, in JavaScript, to dynamically modify CSS "objects."
But, on the whole, I think there is no practical way to "switch" color schemes using only CSS and JavaScript: if there were, then I would guess the "context-sensitive" code you'd have to write in the JavaScript would be a lot more trouble than going through html and doing search-and-replace on id's or class' declarations.
best, 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
|
|
|
|
|
Andrew, an up and coming CSS/HTML JavaScript guru, at ITNewB[^], kindly responded to my sending him a link to this thread with the following comment :
... quoted with permission ... ITNewb is not a "commercial" site ...
"I do see the problem you're having. We can't assign a class to the property portion of an attribute. You can of course apply multiple classes to an element by doing class="class1 class2" and so forth.
Generally speaking, you're still going to have to assign a class to the anchors by one means or another. Sure, you could write big complex selectors but they're quite inefficient.
Try to keep your selectors to no more than two (eg- .box .anchor {}). CSS selectors are parsed from right to left, not left to right. As to how you get those classes applied to your actual anchor elements is up to you.
Also remember the vertical position of your classes matter. Generally, if class B is defined after class A, class B may overwrite properties in class A (such as color etc) which can be useful."
Andrew has some very good articles on things like doing transparent fades in JavaScript using cross-browser techniques[^], etc.
best, 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
|
|
|
|
|
Good link!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
I have html table with input text cells. I tryed with cellspacing and cellpadding, padding and nothing works. I am trying to put cell together so there wouldn't be any space between them. Here is image how it looks now. What else can i try?
|
|
|
|
|
The image link looks ok to me. What space are you trying to get rid off. The white blank cells? or the vertical space between the row?
If it is the former then look at colspan[^]
|
|
|
|
|
Perhaps something like this?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
td{
text-align:center;
color: red;
font-weight: bold;
font-style: italic;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
background-color: #EEE;
border-top: 1px solid darkgray;
border-left: 1px solid darkgray;
border-bottom: 1px solid white;
border-right: 1px solid white;
width: 32px;
}
td input{
width: 100%;
background-color: #eee;
border: none;
}
table{
border: 2px solid black;
}
</style>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="text"/></td>
<td>1</td>
<td>3</td>
</tr>
<tr>
<td>6</td>
<td><input type="text"/></td>
<td>4</td>
</tr>
<tr>
<td>2</td>
<td>9</td>
<td>5</td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
I have my ASP.NET application working fine under Visual Studio's integrated web server.
Also I have set up IIS with my files and can access my application via browser
But My problem is there is a login form which is not working in IIS
but the same login form is working in Visual Studio.
The username and password are not stored in database. I used Form authentication.
My web.config part is shown below
allow roles="Administrators"
deny users="*"
I have everything working fine except the login form in IIS.
Login form is perfectly working under Visual Studio.
Plz help me
|
|
|
|
|
Is the IIS on the same machine as the VS? Are you part of the Admin Group in the machine where IIS is running?
Gjm wrote: allow roles="Administrators"
deny users="*"
did you look closley there? What account are you using? which user group does it belong?
|
|
|
|
|
Hi! I've a little problem!
IE8 can open a Crystal Report document whenever you have added to thust sites. (tested here[^]).
I only want to prevent this procedure and do something in IIS side or programatically cause the site I'm working is a public site and nobody likes read instructions or something like that!
If the user visit the site with IE8 the report won't show! any help?
|
|
|
|
|
I am having 2 Web Application . I want to access same MS Access database in both application. First App has the database in its App folder. Now i want to provide connection to the same database in another App. Please help.
Regards
Rizwan
|
|
|
|
|
Just modify your connection string of your 2nd app to point to the database of your 1st app.
|
|
|
|
|
Hello walterhevedeich,
Thanks for your response. The problem is When i Host this app on a domain. how do i get the location of First App folder in the second App?
Rizwan
|
|
|
|
|
That's the tricky part. . It would make sense if you put your database on a file server. From there, the two applications will be able to access the database without security issues.
|
|
|
|
|
I have report that is made in pull method...
Now i want to use the same report in push method..
so that i dont have to redesing the report that i already have... \
Is there anyway i can do this..
i am using crystal report XI release 2 version to generate report in VS 2005 using vb.net code.
modified on Tuesday, June 1, 2010 9:07 AM
|
|
|
|
|
Now how can anyone answer this?
You have not specified what technology you are using, SSRS, Crystal, ActiveReports, etc., nor what the report is, how you are generating it, nothing.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
really soorry for that...
i am using crystal report X1 release 2 and vs 2005.
|
|
|
|
|
|
Hai friends...
i am using VS2005.My problem s with RDLC report. I can display datas using RDLC reports are working fine. But my need is, when I change the culture to Arabic,All the data should change to Arabic in rdlc report.its working except numbers. I need to display all the numbers in Arabic mode. how can we achieve this?????ur comment plz
|
|
|
|
|
I am saving crystal report as pdf in my machine using pull method....
it was working fine till i added refresh() as it was not refreshing the data..
i am gettin error as Database Logon failed and in inner exception i am getting CrystalDecisions.ReportAppServer.DataSetConversion....
Below is my code...pls help
Dim rptExcel As New ReportDocument
rptExcel.Load("MrRpt.rpt")
rptExcel.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
rptExcel.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
Dim objOptions11 As DiskFileDestinationOptions = New DiskFileDestinationOptions
objOptions11.DiskFileName = strExportFile
rptExcel.ExportOptions.DestinationOptions = objOptions11
rptExcel.Refresh()
rptExcel.Export()//Here it throws error
rptExcel.Dispose()
|
|
|
|