Log in

View Full Version : How to incorporate a Javascript link in a CSS



Jay Dog
12-09-2013, 02:41 PM
Hi,

on the last day of school I'd really like to have something like this on out school webpage:

http://www.schillmania.com/projects/snowstorm/

OK, fairly simple enough so I download the javascript and put the <script type="text/javascript" src="snowstorm.js"></script> command in my <HEAD> bit of a normal html page... no problem.

However as my pages all use a style.css file to base their pages on, do I need to add the <script type="text/javascript" src="snowstorm.js"></script> into my style.css file?

I'm really sorry, CSS is very new to me and I simply don't know where to put it, the css is MASSIVE so I won't include all of it here but here's the first few dozen lines or so...


/*
Theme Name: Big Wood School
Theme URI: http://www.bigwood.nottingham.sch.uk
Description: The default theme for the Big Wood School website.
Version: 1.0
Author URI: http://www.bigwood.nottingham.sch.uk/
Tags: maroon, custom header, custom index, fixed width, two columns, widgets, jQuery


The CSS, XHTML and design is released under GPL:
http://www.opensource.org/licenses/gpl-license.php
*/

/* Begin Typography & Colors */

body {
font-size: 62.5%; /* Resets 1em to 10px */
font-family: Arial, Sans-Serif;
background: url('images/silvertowhite.jpg') repeat-x;
background-color: #ffffff;
color: #333333;
text-align: center;
}

#page {
text-align: left;
}

#header {
background: url('images/header-background.jpg') repeat-x top left;
}

#header-left {
width: 440px;
height: 139px;
float: left;
}

#header-left p {
display: none;
}

#header-right {
background: none;



Or am I barking up the totally wrong tree???


Thanks,


Jay Dog:confused:

ajfmrf
12-09-2013, 04:46 PM
No,they are different and should be seperate of each other.I have never heard of this(I hope there are no 'special' circumstances I am not aware of -lol

If possible it should go at the bottom of the pages code but sometimes it has to go in the head where the css file is.