putting variables in the html section?
-
hey guys and gals.. i am trying to build my site such that i can let the users switch the colors for my tables n stuff.. but i cant get it to compile, so i thought i would ask for a suggestion.. in global.asax file
// setup colors
Application["colors_SubMenu"] = "#000099";
Application["colors_SideBars"] = "#DEEDFE";
Application["colors_NewsHeader"] = "#CAE4FF";
Application["colors_NewsBody"] = "#ECF5FF";in DailyNews.aspx file
its the last line there that is trying to put the application color into the bgcolor field of the table tag.. any suggestions are much appreciated!
still a newb.. cut me some slack :P
-dz">
-
hey guys and gals.. i am trying to build my site such that i can let the users switch the colors for my tables n stuff.. but i cant get it to compile, so i thought i would ask for a suggestion.. in global.asax file
// setup colors
Application["colors_SubMenu"] = "#000099";
Application["colors_SideBars"] = "#DEEDFE";
Application["colors_NewsHeader"] = "#CAE4FF";
Application["colors_NewsBody"] = "#ECF5FF";in DailyNews.aspx file
its the last line there that is trying to put the application color into the bgcolor field of the table tag.. any suggestions are much appreciated!
still a newb.. cut me some slack :P
-dz">
You might want to use cascading style sheets. A cascading style sheet is a file that contains styles you can use on your web page. You don't have to define any particular attribute(s) in your style. Any attribute you don't define will stay the way it currently is, so you can nest styles within each other. That's why it's called Cascading Style Sheets. EXAMPLE: Make a file called MyCSS.css, put it in the same folder as your html file, and put this text in it:
@media all {
//anchor style
A {
color: #0054BB;
}//active hyperlink style
A:active {
color: #D18CE5;
}//hyperlink style
A:link {
color: #0054BB;
}
//visited link style
A:visited {
color: #0084CB;
}
// "H1" header style
H1 {
}
//paragraph style
P {
font-family: "Times", "Times New Roman", "serif";
font-size: small;
font-size-adjust: none;
color: black;
background-color: #75D6E5;
font-weight: bold;
text-align: center;
margin-top: 2%;
margin-left: 2%;
border-top: 3pt;
border-bottom: 2pt;
border-left: 3pt;
}// a custom style
.cTitleHeader {
font-family: "Times", "Chaucer", "serif";
font-size: x-large;
font-weight: bold;
text-align: center;
text-shadow: #000000 2px 2px 2 px;
color: #0000AB;
background-color: transparent;
}
//another custom style
.cdProdTitle {
font-family: "Times", "Times New Roman", "serif";
font-size: medium;
font-size-adjust: 110%;
font-weight: bold;
color: black;
background-color: #75D6E5;
}}
to use this style sheet in html, we put this at the top of our page just after the "title" tag:
To use the style "cdProdTitle, we do this:
< div class="cdProdTitle" > A Title! < /div >
And, there it is! The text "A Title!" will be in the style you defined in your style sheet! I used the div tag but you can apply a style to any tag.
-
You might want to use cascading style sheets. A cascading style sheet is a file that contains styles you can use on your web page. You don't have to define any particular attribute(s) in your style. Any attribute you don't define will stay the way it currently is, so you can nest styles within each other. That's why it's called Cascading Style Sheets. EXAMPLE: Make a file called MyCSS.css, put it in the same folder as your html file, and put this text in it:
@media all {
//anchor style
A {
color: #0054BB;
}//active hyperlink style
A:active {
color: #D18CE5;
}//hyperlink style
A:link {
color: #0054BB;
}
//visited link style
A:visited {
color: #0084CB;
}
// "H1" header style
H1 {
}
//paragraph style
P {
font-family: "Times", "Times New Roman", "serif";
font-size: small;
font-size-adjust: none;
color: black;
background-color: #75D6E5;
font-weight: bold;
text-align: center;
margin-top: 2%;
margin-left: 2%;
border-top: 3pt;
border-bottom: 2pt;
border-left: 3pt;
}// a custom style
.cTitleHeader {
font-family: "Times", "Chaucer", "serif";
font-size: x-large;
font-weight: bold;
text-align: center;
text-shadow: #000000 2px 2px 2 px;
color: #0000AB;
background-color: transparent;
}
//another custom style
.cdProdTitle {
font-family: "Times", "Times New Roman", "serif";
font-size: medium;
font-size-adjust: 110%;
font-weight: bold;
color: black;
background-color: #75D6E5;
}}
to use this style sheet in html, we put this at the top of our page just after the "title" tag:
To use the style "cdProdTitle, we do this:
< div class="cdProdTitle" > A Title! < /div >
And, there it is! The text "A Title!" will be in the style you defined in your style sheet! I used the div tag but you can apply a style to any tag.