SunQuest
           CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 25th, 2001, 04:35 AM
Subcom Subcom is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 12 Subcom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry CSS problem (PHP-related?)

I have a web page, written in PHP, that links to an external cascading style sheet. I have two declarations in my .css file, the second of which is a class:

BODY { background-color: #000000; }

.classexample { font-family: Impact; }

HOWEVER, only the first declaration works on my page!!! Why would the BODY style be imported and work correctly, but the class won't? If I embed the class in the page, it works fine, but it's a no-go from the external sheet.

I've checked and double-checked my syntax and everything seems okay. The only think I can think of that might be screwing things up is PHP, but I don't know how.

I'm totally baffled.

Thanks for any advice you might have. I am using IE 5.5.

(I guess I could just do a PHP include rather than the traditional HTML LINK tag, but I'm still curious as to why I'm having this problem.)

Reply With Quote
  #2  
Old June 25th, 2001, 08:29 AM
Emperor Emperor is offline
Divine Wind
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Mongo
Posts: 24 Emperor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Emperor
I doubt the problem is either PHP or (as might be more likely) browser related (IE5.5. is OK with this kind of thing). If you could copy and paste the part of the webpage where the CSS class is called then we might be able to see what the problem is. The main problem is usually leaving the full stop/period off the start of the class name i.e.:

myClass {
color: red;
}

Emps

Reply With Quote
  #3  
Old June 25th, 2001, 01:41 PM
Subcom Subcom is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 12 Subcom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok, here's the CSS code from the external style sheet:

.storytitle {
font-family: Impact, "Arial Black", Arial, Helvetica, sans-serif;
font-size: 14pt;
}

Here's the code I am trying to use to invoke it (note that this code is (a) nested inside a table, and (b) is from a php-included file - either of which may be causing problems):

print "<SPAN CLASS='storytitle'><A HREF='story.php?storyid=$storyid'>$row[title]</A></SPAN><BR>$row[activated], by $row[username]<BR>";

Still baffled.

Reply With Quote
  #4  
Old June 25th, 2001, 01:50 PM
jeff_cooper jeff_cooper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Columbus, OH
Posts: 11 jeff_cooper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to jeff_cooper Send a message via AIM to jeff_cooper
I'm guessing you're trying to make the link use that style. I think you could do this and get rid of the span tags:

Code:
<a href="yourlink" class="storytitle">link</a>


If you're trying to make $row[activited] and/or $row[username] use the storytitle style you just put the </span> tag to early. (I'm guessing you're trying to make the link do it though.)

If that doesn't work try renaming your style to:
Code:
A.storytitle:link{ }

Reply With Quote
  #5  
Old June 25th, 2001, 03:00 PM
Subcom Subcom is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 12 Subcom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, I cut some parts out of my style sheet to see what would happen, and the problem seems to have solved itself. I guess there was something wrong with my sheet, but hell if I know what it was, since the part of the sheet I was actually using remained unchanged.

I wonder if it will pop up again?

Thanks for the help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS problem (PHP-related?)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway