This content has been marked as final.
Show 12 replies
-
1. Re: adding a class to the body tab
kiusau Apr 2, 2009 11:06 AM (in response to I Love Doing Websites)quote:
I am learning css with dreamweaver cs3, there is an example in the book where some links are going to have an arrow if you are in certain page, for this you put a class in the body tag: <body class=" visiting">, my question is: how can you do that and if you can do that while you are working with templates.
Firstly, you should build your template as if it were an ordinary webpage with special features.
Secondly, your <body> tag contains a class attribute that refers to a CSS rule called .visiting.
If it is written properly, this rule will be located either in the <head> tag of your document, or in an attached CSS file. If it is located in the <head> tag of your document, then you will find it contained in a <style> tag with a type attribute whose value is "text/css".
Roddy
-
2. Re: adding a class to the body tab
I Love Doing Websites Apr 2, 2009 11:21 AM (in response to kiusau)let me give the code:
and the css code:
-
3. Re: adding a class to the body tab
Newsgroup_User Apr 2, 2009 11:31 AM (in response to kiusau)do you mean Templates with a .dwt file extension, or do you mean working
from one of the starter pages from the dw Files->New dialog box?
Take a look at the comment in the page at the css file:
/* THINGS TO LET KNOW THE USER IN WHICH PAGE IS HE/SHE IN THAT MOMENT*/
.living #living a, .business #business a, .chamber #chamber a {
color: #1B1A52;
font-weight: bold;
--
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
-
4. Re: adding a class to the body tab
kiusau Apr 2, 2009 11:34 AM (in response to I Love Doing Websites)quote:
.visiting #visiting a, .moving #moving a, .maplocator #maplocator a, .directory #directory a{
background: url(images/arrow.gif) no-repeat left center;
color:#FF9F00;
}
Look for the above code near the bottom of the code that you appended from your CSS file. Do you see where it says, background:url(images/arrow.gif)? The arrow is contained in the arrow.gif file located in the images folder contained in the same folder as your template.
Roddy
-
5. Re: adding a class to the body tab
I Love Doing Websites Apr 2, 2009 12:12 PM (in response to Newsgroup_User)I meant a .dwt file and make the <body> tag editable so I can put the class -
6. Re: adding a class to the body tab
Newsgroup_User Apr 2, 2009 12:28 PM (in response to Newsgroup_User)
> I meant a .dwt file and make the <body> tag editable so I can put the class
then follow my previous directions.
Edit the .dwt file to make an "editable attribute" of type Text for the
class attribute in the body tag. Give it the desired default value.
then open the child pages, and use modify->Template Properties to change the
value in each child page of the .dwt template.
--
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
-
7. Re: adding a class to the body tab
kiusau Apr 2, 2009 12:40 PM (in response to I Love Doing Websites)quote:
I meant a .dwt file and make the <body> tag editable so I can put the class . . .
Under your current set-up your <body> tag is edited in your (appended/attached) CSS file via two classes: the visiting class and the living class. Alan has correctly pointed you to the living class, and I have correctly pointed you to the visiting class. If you wish to change the appearance of your body tag in your template (dwt) file, then the change should take place in the aforementioned CSS file.
Before you embark on any changes, may I recommend that you make a back-up copy of your CSS file and note any changes that you make in your working CSS file. Comments for CSS files are indicated by the /* and */ delimiters.
In this way, you can maintain good control of your experimentation.
Roddy
-
8. Re: adding a class to the body tab
Newsgroup_User Apr 2, 2009 1:08 PM (in response to Newsgroup_User)
> I meant a .dwt file and make the <body> tag editable so I can put the class
just so i am clear---
the page code you showed contains NO dreamweaver template markup.
It is not a .dwt template.
first- have you "defined a site" ?
if yes- open that page, and File-->Save As Template
Let dw put the file in the Templates folder it will create.
--
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
-
9. Re: adding a class to the body tab
I Love Doing Websites Apr 2, 2009 1:50 PM (in response to Newsgroup_User)Ooo yes,
it is only a html file for the moment, getting ready to convert it to .dwt,
thank you!
Mauricio -
10. Re: adding a class to the body tab
Newsgroup_User Apr 2, 2009 2:11 PM (in response to Newsgroup_User)
> Ooo yes,
>
> it is only a html file for the moment, getting ready to convert it to .dwt,
Okay--
A tip: only .dwt files go into the Templates folder.
Don't put any other files like images or css files into the Templates
folder.
--
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
-
11. Re: adding a class to the body tab
I Love Doing Websites Apr 2, 2009 2:39 PM (in response to Newsgroup_User)thank you very much Sir :) -
12. Re: adding a class to the body tab
kiusau Apr 2, 2009 2:49 PM (in response to I Love Doing Websites)


