Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 01-09-2008, 02:20 PM CSS Menu Templating
Average Talker

Posts: 20
Trades: 0
I have this website, and I want to be able to template the whole thing via CSS if possible. I figured out how to do the header, so if I want to change it all I have to do is use a different picture for it and it changes on all pages. My biggest gripe is about nav menus. I have some buttons I would like to remove, and some new ones I would like to add, but I would have to go to each and every page to do so. Can that be templated somehow, so when you make a change it is global?

Thanks, Todd
Zoddman1 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-09-2008, 02:25 PM Re: CSS Menu Templating
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You can't really template it in the way you're thinking. What you need is Server Side Includes.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-09-2008, 03:20 PM Re: CSS Menu Templating
Average Talker

Posts: 20
Trades: 0
Oh thanks. I don't know anything about that, so I will have to do a bit of research.
Zoddman1 is offline
Reply With Quote
View Public Profile
 
Old 01-09-2008, 03:28 PM Re: CSS Menu Templating
Average Talker

Posts: 20
Trades: 0
Do you know of any good site resources for such info?

Thanks
__________________

Please login or register to view this content. Registration is FREE
Zoddman1 is offline
Reply With Quote
View Public Profile
 
Old 01-09-2008, 03:44 PM Re: CSS Menu Templating
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I'll just drop a self-promo link in here

http://www.candsdesign.co.uk/articles/coding/includes/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-09-2008, 03:58 PM Re: CSS Menu Templating
Average Talker

Posts: 20
Trades: 0
That is exactly what I need to do. More code to figure out, great!
Thanks
__________________

Please login or register to view this content. Registration is FREE
Zoddman1 is offline
Reply With Quote
View Public Profile
 
Old 01-09-2008, 04:05 PM Re: CSS Menu Templating
Average Talker

Posts: 20
Trades: 0
I am not sure if I am looking at this right, so forgive my ignorance here. It looks like you refer a piece of code on your page to a single .htm document. That .htm document being the "template"? Am I in the ball park here?

Todd
__________________

Please login or register to view this content. Registration is FREE
Zoddman1 is offline
Reply With Quote
View Public Profile
 
Old 01-09-2008, 05:07 PM Re: CSS Menu Templating
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
not necessarily a template but maybe only a part of a template that is a section of the whole document.

so header.htm might only be

HTML Code:
<div id="header"><img src="/images/logo.png" alt="logo" title=""></div>
The server takes all the included files and delivers them to the user agent (browser, bot etc) as one single entity.

The pages on my site are built from over 40 included files, there are 3 files plus 6 function libraries that are used for the navigation alone.

I have one file that has only the DTD in it so should I decide to change the whole site to a XHTML doctype I can with one edit.
The clever bit here of course it is scripted so changing that will also change all the end tags to /> where needed.

Even the stylesheet definitions are in an scripted include so I can remove, add in or use a different sheet for other sections of the site.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-09-2008, 06:25 PM Re: CSS Menu Templating
Average Talker

Posts: 20
Trades: 0
Let me try this: on my pages right now, I have a
<div id="navbar">
<ul id="navlist">
(Navbar list info)
</ul>
</div>

Are you saying that I could take this out (<ul id="navlist"> (Navbar list info)</ul>)
Put it in a separate file, and then replace it with an include tag that references that file, and it will look just like it does now?
I am using the <div id="navbar"> for placement on the page.

???????
__________________

Please login or register to view this content. Registration is FREE
Zoddman1 is offline
Reply With Quote
View Public Profile
 
Old 01-09-2008, 07:36 PM Re: CSS Menu Templating
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yep.

provided of course that your server and file extensions you are using support SSI or scripted includes.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to CSS Menu Templating
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.78336 seconds with 12 queries