PC Pals Forum
Technical Help & Discussion => Website Design & Programming => Topic started by: Reno on March 26, 2005, 02:44
-
first go to http://bobscrachy.redirectme.net
the first thing you'll notice is a modified index. Ive modifed most of the environmental variables. One of which is the configuring of apache's header and footer to use css sheets.
Now heres the css sheet itself
<head>
<style type="text/css">
<!--
hr {color: white}
body {background-image: url("/icons/angel.jpg")}
A:text {COLOR:#c0c0c0; TEXT-DECORATION: none}
A:link {COLOR:#cc0000 ;TEXT-DECORATION: none}
A:visited {COLOR:#666666 ;TEXT-DECORATION: none}
A:active {COLOR:#5e6f8e ;TEXT-DECORATION: none}
A:hover {COLOR:#000000 ;TEXT-DECORATION: none}
-->
</style>
</head>
Now this will allow me to change the colors of the text that are links only. Now the strange thing is when i put the css code into the header file and not link the header file to a seperate css file it will change the unlinked text (Name, Size, Description, and the size text) to white or FFFFFF. I can't find any tutorial that will tell me how to modify the css sheet to change the color of unhyperlinked text. Do any of yall have any suggestions?
-
Not that I could help anyway, but that link doesn't seem to work, Bob.
-
yes i took the server offline before i went to sleep lastnight. Sorry simons, its up now.
-
Not sure if this will do it... Only used to using CSS in normal HTML files..
<head>
<style type="text/css">
<!--
hr {color: white}
body {background-image: url("/icons/angel.jpg")}
p { color: #c0c0c0; TEXT-DECORATION: none}
A:text {COLOR:#c0c0c0; TEXT-DECORATION: none}
A:link {COLOR:#cc0000 ;TEXT-DECORATION: none}
A:visited {COLOR:#666666 ;TEXT-DECORATION: none}
A:active {COLOR:#5e6f8e ;TEXT-DECORATION: none}
A:hover {COLOR:#000000 ;TEXT-DECORATION: none}
-->
</style>
</head>
:?: :?: :?:
DJ
-
actually i solved this problem only to run into another less important one.
<STYLE type="text/css">
A:link {
COLOR: F0F0F0;
TEXT-DECORATION: none;}
A:link {
COLOR: F0F0F0;
TEXT-DECORATION: none;}
BODY {
background-color: #000000;
COLOR: #ACA0A0;}
A:visited {
COLOR: #C0C0C0;
TEXT-DECORATION: none;}
A:hover {
COLOR: #000000;
TEXT-DECORATION: none;}
A:active {
COLOR: #5e6f8e;
TEXT-DECORATION: none;}
</style>
this is the code the fix the problem. For some reason the brower ignores the first command "links" and goes to the second and so on. I realized this after switching links with background and gaining my background code by loosing my links code. As you can see the only good solution i could think of was to leave a duplicate links code up there. Which this does what i wanted the css to do, but with the annoyance of me not understand why it does it.
Keep in mind that this problem is only presented when i have this code in a seperate .css file. When i put the css code directly into the html file i don't have to have a duplicate comand. The browser reads the code perfectly.
-
Strange - not sure why that happens.
In normal html files I link to the css page by using
<link rel="stylesheet" type="text/css" href="blue.css" />
(Where blue.css is the location and name of the css file).
In the CSS files it doesn't have the
<STYLE type="text/css">
bit. Could be rubbish coding on my part - not sure if the above will help you at all!
DJ
-
You nailed it. It was the style tags in the css file. That solves the last problem. Thanks man.
-
Glad I could be of help :wink:
DJ