Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

define body attribute using CSS

Status
Not open for further replies.

gchen

Programmer
Nov 14, 2002
174
US
Hi,

why i cannot define background color in below CSS? Can anyone point out where I go wrong?

BODY
{
background-color: #002F5f;
scrollbar-face-color: #002F5F;
scrollbar-shadow-color: #001930;
scrollbar-highlight-color: #163D62;
scrollbar-3dlight-color: #163D62;
scrollbar-darkshadow-color: #001930;
scrollbar-track-color: #031423;
scrollbar-arrow-color: #FF9900;
font-family: Verdana, Arial;
font-weight: none;
font-size: 10pt;
color: 6FA0A0;
}

thanks!

Gary
 
I tried the code and got a dark blue background. Are you using as an include or did you define the background color in the <body> tag too?

DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
I am using it in include and there is nothing i have put in the page <body> tag, all should be coming from CSS body defination. But i do not get the dark blue background from neither MSIE or NN6. Any clue?

Thanks!

Gary
 
Hi,

Also, those font attributes are not functioning. I guess i did not declare them correctly. Can any one point out my error(s)? thanks!

Gary
 
how does your whole page script spell out? cuz that style works for me

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Hi,

here is the entire page where the CSS was inserted by as ssi. thanks a lot!

Gary

<html>
<head>
<title>testing</title>
<style type=&quot;text/css&quot;>
<!-----
BODY
{
background-color: #002F5F;
scrollbar-face-color: #002F5F;
scrollbar-shadow-color: #001930;
scrollbar-highlight-color: #163D62;
scrollbar-3dlight-color: #163D62;
scrollbar-darkshadow-color: #001930;
scrollbar-track-color: #031423;
scrollbar-arrow-color: #FF9900;
font-family: Verdana, Arial;
font-weight: none;
font-size: 10pt;
color: 6FA0A0;
}
A:link {color: #6FA0A0; font-family: Verdana, arial; font-size: 10pt; text-decoration: none; font-weight: bold;}
A:hover {color: #FF9900; text-decoration: underline;}
A:active {color: #DC172E; text-decoration: none;}
A:visited {color: #AFCFCF; text-decoration: none;}
//------>
</style>

</head>
<body>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr><td align=right><img src=logo.jpg height=100 width=100 alt=&quot;EMBsmith&quot;></td></tr>
<tr><td align=right><br></td></tr>
<tr><td align=right>
<a href=process.shtml target=emb>how it works</a>
<p>
<a href=format.shtml target=emb>versatility</a>
<p>
<a href=services.shtml target=emb>flexibility</a>
<p>
<a href=login.shtml target=emb>log in</a>
<p>
<a href=aboutus.shtml target=emb>about us</a>
<p>
<a href=contactus.shtml target=emb>contact us</a>
<p>
</td></tr></table>
this is just to test if all is fine!
</body>
</html>

 
IT WORKS!

i doubt there is sort of sequencial order or override declaration in a single CSS object, so i re-arrange my code and it works now. Below is the working codes yet i would like to know if it is true that there is sequence involved in declaring CSS attributes, thanks!

<style type=&quot;text/css&quot;>
<!--
body {
background:#002F5F;
color:#AFCFCF;
font-size:10pt;
font-family:verdana, arial;
scrollbar-face-color: #002F5F;
scrollbar-shadow-color: #001930;
scrollbar-highlight-color: #163D62;
scrollbar-3dlight-color: #163D62;
scrollbar-darkshadow-color: #001930;
scrollbar-track-color: #031423;
scrollbar-arrow-color: #FF9900;
}
a:link {color: #6FA0A0; font-family: Verdana, arial; font-size: 10pt; text-decoration: underline; font-weight: bold;}
a:visited {color: #CFCFCF; text-decoration: none; font-weight: bold;}
a:active {color: #DC172E; text-decoration: underline: font-weight: bold;}
a:hover {color: #FF9900; text-decoration: underline; font-weight: bold;}

h1 {
color:#DC172E;
font-size:20pt;
font-weight:bold;
font-family:verdana, arial;
}

td {
color:#AFCFCF;
font-size:10pt;
font-weight:none;
font-family:verdana, arial;
}

-->
</style>
 
i try and keep mine in order from greatest to smallest

ie. BODY -- table -- td -- div -- h1...

same with tags

Code:
<table>
   <tr>
      <td><div><h1></h1></div></td>
   </tr>
</table>

some sort of structure to make is easier to go through your @#%@#% when the fit hits the shan.

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top