Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old July 24th, 2005, 06:38 PM
jules213 jules213 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 13 jules213 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 43 sec
Reputation Power: 0
confused about templates & non-editable regions

Hi all,

ok, i feel that this may be a real dumb question, but i can't find the answer to it so here goes.

to date I have been mostly using dreamweaver, but am slowly weening myself of it and using validated code and css.

anyway, when i design a site, i use the dreamweaver templates .dwt to make changing things such as menus easier in the future.

i have recently been learning about suing css for roll-over images in menus, and in particular want to have a different colour image for the area of the site which is currently selected.

Now, unless i'm being real dumb, i can't have this if i use a template, as on each page the id="selected" needs to be next to a different link.

Now does this mean that I have to build a fresh page each time, and if I want to add a new category, alter all the pages in the site?

It would seem to me that when a site uses different images for link, hover & active (selected) that there must be a way of still having a template style system set up, in case a new category is added.

As i said, probably a basic and dumb question, but if anyone knows what i;m going on about and can enlighten me, that would be appreciated, as I haven't a clue.

Many thanks,

Jules

Reply With Quote
  #2  
Old July 25th, 2005, 08:00 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
I'm not sure of a Dreamweaver-friendly solution... However I saw an interesting [web standard] way of doing this before.

Let's say your page is a grocery store, and your main navigation is Meat, Vegetables, Fruit, Seafood, and Dairy.

Your code may look like this:
Code:
<ul id="mainNav">
	<li id="navDairy">Dairy</li>
	<li id="navFruit">Fruit</li>
	<li id="navVegetables">Vegetables</li>
	<li id="navMeat">Meat</li>
	<li id="navSeafood">Seafood</li>
</ul>

For each section, put an ID on the BODY tag.
<body id="fruit">

Your CSS could then be:
Code:
#dairy #navDairy, #fruit #navFruit,
#vegetables #navVegetables,#meat #navMeat,
#seafood #navSeafood, #mainNav li:hover {
	... properites ...
}

The overall effect could be as follows:
Code:
<html>
<head>
<style>
#mainNav {
	width: 200px;
	padding: 0;
	margin: 0;
	list-style: none;
}
#mainNav li {
	background-color: #ccc;
	border-right: 3px solid #000;
	border-bottom: 3px solid #000;
	border-top: 3px solid #fff;
	border-left: 3px solid #fff;
	text-size: large;
	font-weight: bold;
	font-family: courier;
}

#dairy #navDairy, #fruit #navFruit,
#vegetables #navVegetables,#meat #navMeat,
#seafood #navSeafood, #mainNav li:hover {
	background-color: #666;
	border-right: 3px solid #fff;
	border-bottom: 3px solid #fff;
	border-top: 3px solid #000;
	border-left: 3px solid #000;
}
</style>
</head>

<body id="fruit">
<ul id="mainNav">
	<li id="navDairy">Dairy</li>
	<li id="navFruit">Fruit</li>
	<li id="navVegetables">Vegetables</li>
	<li id="navMeat">Meat</li>
	<li id="navSeafood">Seafood</li>
</ul>
</body>
</html>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > confused about templates & non-editable regions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway