This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > October 2005 > Is it legal to override CSS?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Is it legal to override CSS?
|
|
| typingcat@gmail.com 2005-10-12, 6:27 pm |
| 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.
| |
| Steve Pugh 2005-10-12, 6:27 pm |
| typingcat@XXXXXXXXXX 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
| |
| 'sNiek 2005-10-12, 6:27 pm |
| typingcat@XXXXXXXXXX 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
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|