Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Stylesheets with php includes

Posted on 2011-02-17
6
Medium Priority
?
328 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 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
Independent Software Vendors: 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

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.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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…
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

688 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