Solved

Stylesheets with php includes

Posted on 2011-02-17
6
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Suggested Courses

630 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