473,378 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Is it legal to override CSS?

I've added two stylesheets at the header the first one is a stylesheet
for all the pages, and the second one is for this page only. Just like
the followng.

<link rel="stylesheet" .... href="common.css">
<link rel="stylesheet" .... href="specific.css">

If a style for an element is defined both in the common stylesheet and
the page specific stylesheet, it seems the later one overrides the
first one. The reason why I do this is, there are the same navigation
part on every pages, but for a particular page, I want to use a little
bit differnent style for the navigation part.

Overriding just works as I expected without problemts, but I just want
to know it is a legal CSS way.

Oct 12 '05 #1
2 1290
ty*******@gmail.com wrote:
I've added two stylesheets at the header the first one is a stylesheet
for all the pages, and the second one is for this page only. Just like
the followng.

<link rel="stylesheet" .... href="common.css">
<link rel="stylesheet" .... href="specific.css">

Overriding just works as I expected without problemts, but I just want
to know it is a legal CSS way.


Absolutely. It's what the C in CSS is all about.

Steve

Oct 12 '05 #2
ty*******@gmail.com schreef:
I've added two stylesheets at the header the first one is a stylesheet
for all the pages, and the second one is for this page only. Just like
the followng.

<link rel="stylesheet" .... href="common.css">
<link rel="stylesheet" .... href="specific.css">

If a style for an element is defined both in the common stylesheet and
the page specific stylesheet, it seems the later one overrides the
first one. The reason why I do this is, there are the same navigation
part on every pages, but for a particular page, I want to use a little
bit differnent style for the navigation part.

Overriding just works as I expected without problemts, but I just want
to know it is a legal CSS way.


Looks like you invented the wheel ;-)
--
Niek
Oct 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pakkocool | last post by:
¿Como ganar dinero en internet? Lee atentamente el siguiente texto, es super interesante y te hara ganar muchos dolares si sigues las instrucciones y le pones empeño: Hace unos días que...
0
by: mykidisgollum | last post by:
Greetings, I have code which prints a document who's attributes are saved as flags in a database. One of the those attributes is letter or legal. When I am printing, I use the following...
5
by: Mark Broadbent | last post by:
Oh yes its that chestnut again! Ive gone over the following (http://www.yoda.arachsys.com/csharp/faq/ -thanks Jon!) again regarding this subject and performed a few of my own tests. I have two...
5
by: Stoyan | last post by:
Hi All, I don't understand very well this part of MSDN: "Derived classes that override GetHashCode must also override Equals to guarantee that two objects considered equal have the same hash code;...
1
by: Brian | last post by:
I'm trying to comile some managed C++ code in VC++ 2005 beta that has a lot of exception specifications,ie int func() throw( SomeException*) ; I'm getting these messages: error C2353:...
2
by: Adriano Coser | last post by:
Hello. After I converted my .net code to the new VC2005 syntax I started to get C4490 on my ExpandableObjectConverter subclass overrides. The GetProperties method is no longer called by the...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
5
by: Marcel Hug | last post by:
Hi NG ! I'm new in C# and I'm reading a book about the fundamentals and concepts. In the chapter Methods it's written to use virtual, if i would like to override the method in a subclass. This...
2
by: Old Wolf | last post by:
Is the following code well-defined, and outputs foo twice? #include <iostream> struct Base1 { virtual void foo() = 0; }; struct Base2 { virtual void foo() = 0; }; struct Derived: Base1,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.