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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP refering to CSS style sheet

Status
Not open for further replies.

BlindPete

Programmer
Jul 5, 2000
711
US
I have a CSS style sheet provided by others that I am not allowed to alter. The problem I am having is that in the style sheet the following classes are defined, but I can't seem to refernce them.

.bg1 {background-color: #F5F5F5;}
.bg2 {background-color: #F5F5F5;}
.fg1 {color: #000000;}
.fg2 {color: #000000;}


In my PHP page I have loaded the style sheet and the body, hover etc predefines seem to work fine but I can not seem to reference these colors for table in the page? Any thoughts on what I may be doing wrong?

print &quot;<tr class='bg2'><td colspan='2'><span class='fg2'><b>&quot; .$ContextOne.&quot;</b></span></td></tr>&quot;;
-Pete[noevil]
 
I see nothing wrong with your PHP or your HTML. The HTML works for me. If other parts of the stylesheet are working for you, I see no reason why it doesn't work.

Two possibilities:

Does $ContextOne contain HTML which might override your other style settngs?

The color and background-color settings are awfully close to the table defaults for IE -- in short, they're working, but working to make the styles look like the defaults. In particular, the grey of the background-color is very close to the off-white of IE's default background. Could your monitor's contrast and brightness settings be making the style look like the default?
______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
yes it could I', using a laptop... color depth is not great. -Pete[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top