Sponsor for PC Pals Forum

Author Topic: CSS question  (Read 3153 times)

Offline Reno

  • Established Member
  • ****
  • Posts: 1286
  • ø¤º° bob °º¤ø
CSS question
« 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

Code: [Select]
<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?

Offline Simon

  • Administrator
  • *****
  • Posts: 76833
  • First to score 7/7 in Quiz of The Week's News 2017
CSS question
« Reply #1 on: March 26, 2005, 09:10 »
Not that I could help anyway, but that link doesn't seem to work, Bob.
Many thanks to all our members, who have made PC Pals such an outstanding success!   :thumb:

Offline Reno

  • Established Member
  • ****
  • Posts: 1286
  • ø¤º° bob °º¤ø
CSS question
« Reply #2 on: March 26, 2005, 17:14 »
yes i took the server offline before i went to sleep lastnight. Sorry simons, its up now.

Offline DJ

  • Established Member
  • ****
  • Posts: 1448
CSS question
« Reply #3 on: March 26, 2005, 18:29 »
Not sure if this will do it... Only used to using CSS in normal HTML files..

Code: [Select]

<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

Offline Reno

  • Established Member
  • ****
  • Posts: 1286
  • ø¤º° bob °º¤ø
CSS question
« Reply #4 on: March 26, 2005, 18:33 »
actually i solved this problem only to run into another less important one.

Code: [Select]
<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.

Offline DJ

  • Established Member
  • ****
  • Posts: 1448
CSS question
« Reply #5 on: March 26, 2005, 18:54 »
Strange - not sure why that happens.

In normal html files I link to the css page by using

Code: [Select]

<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

Code: [Select]
<STYLE type="text/css">

bit. Could be rubbish coding on my part - not sure if the above will help you at all!

DJ

Offline Reno

  • Established Member
  • ****
  • Posts: 1286
  • ø¤º° bob °º¤ø
CSS question
« Reply #6 on: March 26, 2005, 19:30 »
You nailed it. It was the style tags in the css file. That solves the last problem. Thanks man.

Offline DJ

  • Established Member
  • ****
  • Posts: 1448
CSS question
« Reply #7 on: March 26, 2005, 19:35 »
Glad I could be of help  :wink:

DJ


Show unread posts since last visit.
Sponsor for PC Pals Forum