HighDots Forums  

CSS navbar created from template?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss CSS navbar created from template? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tintin81
 
Posts: n/a

Default CSS navbar created from template? - 09-08-2005 , 01:52 PM






I am using a lot of CSS for my site and would like to create a template that I
can use to create new pages more quickly. The centerpiece of my site is a huge
navbar with about 10 buttons. This navbar has to be on every single page
created from the template. However, for ease of navigation it is vital that the
CURRENTLY selected button on that navbar looks different to the other,
non-selected buttons. In order to achieve this I have to work through every
single page and add the id="current", right? I was wondering if there's an
easier way to achieve this, i.e. through the use of a template.

Can anybody help?

The HTML code on the "Home" page:

<div id="navbar">
<ul>
<li><a href="#" id="current">Home</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Contacts</a></li>
</ul>
</div>


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: CSS navbar created from template? - 09-08-2005 , 02:07 PM






Use unique button ID values, e.g.,

<div id="navbar">
<ul>
<li><a href="#" id="button1">Home</a></li>
<li><a href="#" id="button2">About us</a></li>
<li><a href="#" id="button3">Contacts</a></li>
</ul>
</div>

and load your CSS for each when selected into the stylesheet, e.g.,

#page1 #button1 a { styles; }
#page2 #button2 a { styles; }
etc....

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Tintin81" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I am using a lot of CSS for my site and would like to create a template
that I
can use to create new pages more quickly. The centerpiece of my site is a
huge
navbar with about 10 buttons. This navbar has to be on every single page
created from the template. However, for ease of navigation it is vital
that the
CURRENTLY selected button on that navbar looks different to the other,
non-selected buttons. In order to achieve this I have to work through
every
single page and add the id="current", right? I was wondering if there's an
easier way to achieve this, i.e. through the use of a template.

Can anybody help?

The HTML code on the "Home" page:

div id="navbar"
ul
li><a href="#" id="current">Home</a></li
li><a href="#">About us</a></li
li><a href="#">Contacts</a></li
/ul
/div




Reply With Quote
  #3  
Old   
George Duh-bya
 
Posts: n/a

Default Re: CSS navbar created from template? - 09-09-2005 , 10:49 AM



"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in news:dfq254$qdc$1
@forums.macromedia.com:

Quote:
Use unique button ID values, e.g.,

div id="navbar"
ul
li><a href="#" id="button1">Home</a></li
li><a href="#" id="button2">About us</a></li
li><a href="#" id="button3">Contacts</a></li
/ul
/div

and load your CSS for each when selected into the stylesheet, e.g.,

#page1 #button1 a { styles; }
#page2 #button2 a { styles; }
etc....

is the #page1 the filename?


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: CSS navbar created from template? - 09-09-2005 , 10:54 AM



No, sorry - I assumed you'd get it. #page1 is an id that you apply to the
body tag. So, on a page where you want the #button1 to be down, you'd apply
id="page1" to the body tag. On a page where you want #button2 to be down,
you'd apply id="page2" to the body tag. The CSS sorts itself out.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"George Duh-bya" <dumbass (AT) whitehouse (DOT) gov> wrote

Quote:
"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in
news:dfq254$qdc$1
@forums.macromedia.com:

Use unique button ID values, e.g.,

div id="navbar"
ul
li><a href="#" id="button1">Home</a></li
li><a href="#" id="button2">About us</a></li
li><a href="#" id="button3">Contacts</a></li
/ul
/div

and load your CSS for each when selected into the stylesheet, e.g.,

#page1 #button1 a { styles; }
#page2 #button2 a { styles; }
etc....

is the #page1 the filename?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.