Old 13-08-2003, 11:32   #1 (permalink)
andrewparker
Senior Member
 
andrewparker's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 991
Overwriting a stylesheet

I have a template that imports a stylesheet however I want to overwrite one of the styles on a number of pages.

How is this possible?
__________________
Andrew Parker

---------------------

(Apple PowerBook G4 1.67GHz / 1Gb RAM / OS X / Safari )
  Reply With Quote
Old 13-08-2003, 11:40   #2 (permalink)
andrewparker
Senior Member
 
andrewparker's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 991
To elaborate slightly, this it the head of my template -

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><!-- InstanceBegin template="/Templates/school_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>The School of Human &amp; Health Sciences -- Applied Childhood Studies</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--link before import prevents Flash Of Unstyled Content in ie6pc -->
<link href="../css/nn4.css" rel="stylesheet" type="text/css" />
<!--link href="css/localnn4.css" rel="stylesheet" type="text/css" /-->
<style type="text/css">
<!--
@import url("../css/real.css");
-->
</style>
<!-- import with quotes and brackets hides real.css from:
Netscape 4.x, Win IE 3, Win IE 4, Mac IE 4.01, Mac IE 4.5, Konqueror 2.1.2, Win Amaya 5.1
Sorry, folks! -->
<!-- InstanceBeginEditable name="head" -->
<!-- Import local css here !! -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --><!-- InstanceEndEditable -->
<script language="JavaScript" type="text/JavaScript"> var _version = 1.0; </script>
<script language="JavaScript1.1" type="text/JavaScript"> _version = 1.1; </script>
<script language="JavaScript1.2" type="text/JavaScript"> _version = 1.2; </script>
<!-- InstanceBeginEditable name="navigation" -->
<script language="JavaScript" type="text/javascript">
<!-- localLookup is a JS variable, works with the separate nav.js to construct the local navigation menus
/* The structure of each line, to be added between the curlies, is: {
filename_without_the_.htm_extension: ["text to display", "url to link to"]
}; (add a comma at the end of every line except the last one).
It is assumed that *all* the local files are in the same folder, and no others. */
var localLookup = {
about: ["About&nbsp;the&nbsp;Centre", "http://www.hud.ac.uk/hhs/research/acs/about.htm"],
projects: ["Current&nbsp;Projects", "http://www.hud.ac.uk/hhs/research/acs/projects.htm"],
pub: ["Centre&nbsp;Publications", "http://www.hud.ac.uk/hhs/research/acs/pub.htm"],
staff: ["Staff&nbsp;Information", "http://www.hud.ac.uk/hhs/research/acs/staff.htm"],
resource: ["Web&nbsp;Resources", "http://www.hud.ac.uk/hhs/research/acs/resource.htm"]
};
//-->
</script>
<!-- TemplateBeginEditable name="scriptlock" -->
<!--scriptlock-->
<!-- TemplateEndEditable -->
<!-- InstanceEndEditable -->
</head>
__________________
Andrew Parker

---------------------

(Apple PowerBook G4 1.67GHz / 1Gb RAM / OS X / Safari )
  Reply With Quote
Old 13-08-2003, 12:33   #3 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,190
seperate stylesheet? different template?

surely if you want to overwrite one of the styles then it is a new style?

need more info really. i'm a bit confused here...
  Reply With Quote
Old 13-08-2003, 12:41   #4 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,340
have went to type on three occasions with and answer

but somehow they all fail

can you use embedded css in #include

or define a load of attributes that are not used in main page but are in #include page

or just hard code the template for those pages
  Reply With Quote
Old 14-08-2003, 03:52   #5 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
Either redefine the style inline or import another style sheet after the first with the style redefined? Does that make sense?

CSS's inheritance will take care of the rest.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 14-08-2003, 04:19   #6 (permalink)
andrewparker
Senior Member
 
andrewparker's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 991
Sorry guys.....

I knew how to do this but yesterday was a bastard of a day!

I'd simply forgotten to add the style type declaration

<style type="text/css">
<!--
@import url("../css/acs.css");
-->
</style>

'tard!
__________________
Andrew Parker

---------------------

(Apple PowerBook G4 1.67GHz / 1Gb RAM / OS X / Safari )
  Reply With Quote
Old 14-08-2003, 05:15   #7 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
Yesterday I forgot how to spell 'shone'. It still doesn't look right!
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.

Last edited by smallbeer : 14-08-2003 at 05:36.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8