css on a template

hi
all the pages of a site i`m building are based on a template i have created. now i want to create an external css and to imlement it on the pages. but when i try to create the css file i get a message: if you are working on a page with a template make sure that there is an editable region to the head tag.
now i now how to make en editable region in the body, but how can i make it to the head tag?

best regards

ron
LVL 1
derridaAsked:
Who is Participating?
 
radnorCommented:
WHAT?!?

Start DW
click File -> New ->General tab -> CSS ---> Create
edit this file as you see fit.
I will then save it with my HTML pages (same directory)  and give it a name of styles.css

Then I open my TEMPLATE.   (The ENTIRE template IS editable!)
Click Text -> CSS Styles -> Attach Style Sheet

A new window will open (Link External Style Sheet)
Click browse go to the directory where your HTML and CSS files reside and select the CSS file
Click OK then OK again and your DONE!!!

This line was inserted ABOVE the closing HEAD tag
<link href="../styles.css" rel="stylesheet" type="text/css" />
</head>

then SAVE your TEMPLATE.  All pages created with THIS template WILL BE UPDATED and use the style sheet.

Your done!!!


0
 
Jason C. LevineNo oneCommented:
In the source code of the template, select the Head tag and the Modify | Templates | Make Editable Region
0
 
derridaAuthor Commented:
hi
through the "modify" menu there is no "make editable region" so i tried it through the "insert" menu. but then it is seen on the page itself.


ron
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
Jason C. LevineNo oneCommented:
I think it is called Make Attribute Editable and the whole tag from <head> to </head> has be selected.

It's there...
0
 
derridaAuthor Commented:
hi
i chose the whole head tag, then modify-templates-make attribute editable.
then a dialogue box come up and in the drop down menu there is nothing.
i pressed "add" and i am not sure what to write there: "css"?
then i could add an external css to all the pages that are based on the template?


best regards

ron
0
 
Jason C. LevineNo oneCommented:
Ron,

My bad. I was working from memory and my memory was faulty.

In the template source code, look for the following lines in between the Head tags:

<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->

If those are there, you can insert the <link rel="stylesheet" type="text/css" href="your.css"> after the begineditable comment.

If those are not there, do Insert | Template Objects | Editable Region inside the Head tag.  It will insert something like the above.  Then add the CSS style to the template and reapply the template to all pages in the site.
0
 
derridaAuthor Commented:
hi
bizzare thing has happened. the lines were not there so i tried to insert them. as i inserted them it completly deleted the body tag. i mean all the table with everithing in it.
maybe i will write in the new template i`ll do these two lines by hand?
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
but where exactly?
<head>
<!-- TemplateBeginEditable name="head" -->
then every thing that is in the head tag. and then
<!-- TemplateEndEditable -->
</head>
is that the right way?
can i attach an external css to the page before making it into a template? so then every page that will be built on the template will also have the css?


best regards

ron
0
 
Jason C. LevineNo oneCommented:
Ron,

Radnor is right, this should be easily done by editing the .dwt file.  Have you been editing that file or a page based on a template.
0
 
radnorCommented:
From the sound of it, I think he is trying to edit a page CREATED from a template.

0
 
Jason C. LevineNo oneCommented:
I'm starting to think that way too.  Sorry about the wrong path, guys.  We have a new baby in the house and my mind has been wandering.
0
 
derridaAuthor Commented:
hi
no i was working on the template itself. as far as i know i can add editable regions just to templates.
and then when i inserted the lines the whole boddy part disappeared, and so other pages that was built on this template, so now i have to rebuild everythig again. i have no idea what has happened.
but i need to know for the future: if i build a page and before making it a template i attach to it an external css will all the pages built on this template will be using the external css?
if not how exactly (and please give me a detailed answer) do i make the head an editable region whithin a template?


best regards

ron
0
 
Jason C. LevineNo oneCommented:
>> but i need to know for the future: if i build a page and before making it a template i attach to it an external css will all the pages built on this template will be using the external css?

Yes.
0
 
radnorCommented:
jason1178,

Dont mean to hijack the thread but, CONGRATS dude!  1st one?  I have 2, young adults now.  
0
 
Jason C. LevineNo oneCommented:
first one.  I've been at the hospital since Thursday on a borrowed laptop.  

http://www.babysites.com/sites/babylevine/
0
 
derridaAuthor Commented:
hi
well its not about the subject but congratulation for the new baby:)

ron
0
 
Jason C. LevineNo oneCommented:
Thanks Ron.

Back to you now.  Where are we at with your problem.  Have you recovered the template yet?
0
 
derridaAuthor Commented:
hi

i almost finished to rebuilt the page then i`ll attach en external css to it. then i`ll define it as a template.
if i understood correctly then every page base on that template will be attached also to the css.
am i right?


best regards

ron
0
 
radnorCommented:
Here  about 4 replies from the bottom I described templates.....

http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_21744013.html

I think it will clear the idea of templates up.
0
 
Jason C. LevineNo oneCommented:
Hi mrichmon,

rador's answer is the best one.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.