Navigation Menus Created Within CSS - EXPERT HELP NEEDED

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a CSS that swaps BG images when hovered over and I use more than 1
menu in my site. For example, I have a menu for the leftnav, rightnav and
topnav. Sometims I like ad a link to a menu, but must go to each and every
page in my site and make the change one at a time. I can edit the CSS to
change the BG images all at once on all pages, but I can't edit the CSS to
add or delete links used in the menus.

What I would like to do is create a code in my CSS that would allow me to
identify the menus and add or delete links so I can update the menu on all
pages from one location. If this cannot be done, then I would like another
code for creating a menu subject to a CSS that only needs to be updated from
a single location.

Below is the code for my "swap images". If there is a way to add my menu to
this, could you please add the code (or) give me a clear example of a code to
create a menu from one location.
 
I gather these aren't FrontPage Link Bar components. Therefore, for each menu:

1. Create a new page that contains nothing but the menu.
2. Use Insert, Web Component, Included Content, Page, Finish, (page name),
Finish to copy the page content from page 1 into each page that uses the
menu.

Now, updating any "step 1" page will update any "step 2" page that includes
it.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
o--> Microsoft Visual Web Developer 2005 Express Edition: Build a Web Site
Now!
o--> Microsoft Office FrontPage 2003 Inside Out
o--> Microsoft Windows SharePoint Services Inside Out
o--> Faster Smarter Beginning Programming
 
What code below? :-)

The easiest response I can think of at the moment is to suggest you pull all
pertinent classes out of the primary stylesheets, create isolated
stylesheets with only those class declarations required for a specific task
(color or images and so on) and then use server-side or client-side code to
generate the link elements in the head dynamically to take advantage of
cascading.

That will give you a series of small files to manage each of which is
isolated and singular in its purpose allowing you to edit values in a single
location.

As for needng to go through all of the HTML to make changes one work-around
I devised was a generic class naming schema reminding that we can declare
more than one class in any declaration such as class="class1 class2 class3"
okay?

I was applying this schema to color management using naming conventions such
as class="PC-on-SC" which represented Primary Color on Secondary Color. I
used Primary, Secondary and Complimentary colors as my base color scheme and
included DC and NC for Default Color which is white and No Color for black
which is consistent with the laws of physics. Technically speaking DC should
have been named AC for All Color but bi big deal. The point is to devise a
systematic schema.

In my HTML I could declare classes such as class="class1 SC-on-DC" and so on
where class1 would be an ordinary class used to manage margins, padding or
whatever was called for. This helped me manage the actual hex values as they
only needed to be changed in stylesheets where I often used global search
and replace when needed. I also used isolation to make small stylesheets
with specific declarations and then ordered them in the head using script as
I suggested above to take advantage of the cascade.

AFIC -- and I think many share my opinoin -- CSS has been flawed in its
design since day one and remains FUBAR in this context as it is purely
declarative and does not support inline expressions allowing properties of a
class to be modified dynamically.

Themes and Skins in ASP.NET 2.0 have taken a leap forward in this regard as
the dynamic processing can be done on the server supporting many more
instances of variance that can be managed dynamically. Along with the
greater flexibility comes more need to learn, plan, try, test, fail and
repeat until an optimal solution has been discovered as the Themes and Skins
as implemented in ASP.NET 2.0 are new and there is much to be learned but so
far using Themes and Skins seems very useful and if needed I can use code to
write link elements into the head to over-ride anything I need so I remain
in control of the cascade.

There's many different ideas floating around.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
Thank you so much Jim. Michelle



Jim Buyens said:
I gather these aren't FrontPage Link Bar components. Therefore, for each menu:

1. Create a new page that contains nothing but the menu.
2. Use Insert, Web Component, Included Content, Page, Finish, (page name),
Finish to copy the page content from page 1 into each page that uses the
menu.

Now, updating any "step 1" page will update any "step 2" page that includes
it.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
o--> Microsoft Visual Web Developer 2005 Express Edition: Build a Web Site
Now!
o--> Microsoft Office FrontPage 2003 Inside Out
o--> Microsoft Windows SharePoint Services Inside Out
o--> Faster Smarter Beginning Programming
 
Back
Top