| Author |
Re-using code written once and calling it again
|
|
| 0shania0 2005-03-10, 7:19 am |
| HI there!
im using DWMX with VBScript
i just wanted 2 know if there is a way 2 re-use repiting code to be applied to
all my web pages>?
I read a topic where it said it wasnt good practice to actually have repeating
code in each page?
For example the CSS i have used are consistent in all the pages but I have to
copy and paste the page instead of writing up the CSS again!
i have come acrss a .asa page
which uses
<!--# include virtual="/pagetop.txt"-->
is that the what I have to use - or am I completely off track>?
i dont really know how to apply the above - so if ne1 has any comments I will
be really grateful!!
Also: like I have included a AdRotator for banner advertisement which are
repited on several pages and like my navigation
so would it be possible to have a sor of template where I just call the code?
Thnx
| |
| Ross Riley 2005-03-10, 6:26 pm |
| For your css you need to put them all in a file called for example styles.css
Then at the top of each page put the following line <link href='styles.css'
rel='stylesheet' type='text/css' /> Then they will be included.
| |
| 0shania0 2005-03-10, 6:32 pm |
| Hi!!
Thans for reply!!
Sorry for being completely thick!!
but for example the file' called for example styles.css'
would those css be defines in a normal DW VBScript.asp page
or would that be called from a text document?
and these no need for that .asa page right?
if you could just clarify that for me
id be really grateful!!
Thankyou
| |
| Ross Riley 2005-03-12, 7:24 am |
| just create a text file (or if you're in DW a new css document) put your style
inside.. eg. body { margin:0px; } and so on, then put that link line at the
top of each page that you want it to be included on.
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |