Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Stylesheets with php includes

Posted on 2011-02-17
6
Medium Priority
?
329 Views
Last Modified: 2012-05-11
I have created a page that I will use php includes to add to another page.  I need the stylesheet for the "includes" page to override the stylesheet for the page that it is going on.  

For the most part, the pages are on the same server just in different folders where different domain names point to those folders.  

I have tried
<style type="text/css">
@import url("http://www.brightideaswebdesign.com/includes/news/newsstyle.css");
</style>

and it works on Firefox and Safari but not on Chrome.  I have a Mac so I haven't checked on IE yet.

0
Comment
Question by:brightsusan
  • 3
  • 3
6 Comments
 
LVL 8

Expert Comment

by:imantas
ID: 34922257
Does the Chrome ignore whole CSS file or just some of the styles are overridden? Link to the page where the problem appears would be appreciated.
0
 

Author Comment

by:brightsusan
ID: 34922546
It seems to ignore all of it.

http://www.trainwithcasie.com 

about 1/2 way down on the right side (under the "Movin On Up' graphic) there is a link that says "Click Here" to view the Mary Kay Career Path At a Glance)  The link is supposed to be a tan color and it is in other browsers but not in chrome.
0
 
LVL 8

Accepted Solution

by:
imantas earned 2000 total points
ID: 34922640
I think you have errors in your stylesheet.

First of all
.dark a:link{
	color: #CCC;	
}

Open in new window

doesn't make sense as it is overriden by
table #different a:link{
	text-decoration: underline;	
	color: #000;
}

Open in new window

I think you meant to define '.dark a:link' styles after the 'table #different a:link' as the last one declared is applied to the element.


Secondly, I think you meant "table#different" (table with ID = 'different') instead of "table #different" (all descendants of any table in the page with ID = 'different').

Thirdly, I don't get the idea what does this supposed to mean:
...
<tr style="a:link">
...

Open in new window

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:brightsusan
ID: 34926996
The first and last of those were just things I was trying.

The middle is actually for all links inside that table.  The reason for that is that the pages that I will be "including" this on have different styles for links and I want this table to have the same link color across the board without taking on each style of each site.

I want the table links to be black and underlined but then this certain link I need to be #ccc since it is in a dark brown background.

What would be the best way to do that?
0
 
LVL 8

Expert Comment

by:imantas
ID: 34930167
I see that you've changed the stylesheet.

You have a line:
a.brown:link {color: #ccc; text-decoration: none; }

Open in new window


Change it to:
a.brown:link {
  color: #ccc !important;
  text-decoration: none;
}

Open in new window


That might help
0
 

Author Comment

by:brightsusan
ID: 34930220
Didn't work.  It still works on Safari and Firefox but not Chrome
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question