I am a total lamer clueless stupid newbie (so please flame me).
Honestly, I know nothing of CSS, although I tend to pick things up
quickly...
A friend pointed out that my JavaScript menu prevents Google from
crawling my site and told me that I need a CSS menu.
Ok, I'm willing. So I looked at a bunch of examples and one thing
bothers me ...
What f I want to change my menu? Maybe just add a new item...
Do I have to update every page on my site, or does HTML have a #include
directive?
Obviously; it is better to pull in the menu from a single external
file, but can I do that with pure HTML?
Hmmm, I could use PHP to do it; that would pull the menu in before
webcrawlers ever got to see the page.
Yes, that looks like the solution, unless there is a better one (this
is surely a FAQ).
>Honestly, I know nothing of CSS, although I tend to pick things up
>quickly...
Here is where you can find a description of the closest to a CSS
recommendation we have...
<http://www.w3.org/TR/CSS21/>
...and here is one of the absolute best tutorial sites.
<http://www.westciv.com/style_master/house/tutorials/index.html>
>A friend pointed out that my JavaScript menu prevents Google from
>crawling my site...
Yep; that's one thing that people generally don't understand at first.
But the real truth is that Google (and other indexers) don't interpret
client side scripts ("me" are you listening? my claim is that this
worlds absolute biggest "web user" always runs with scripting turned off
:-)
>...and told me that I need a CSS menu.
It would be a workable solution, yes.
>Ok, I'm willing. So I looked at a bunch of examples and one thing
>bothers me ...
>What f I want to change my menu? Maybe just add a new item...
If you have an access method to configure your own server space you
might be able to use a server side include technique to assemble your
pages from bits and pieces "on the fly".
With that method you could keep your menu system in a separate file to
be included in any page where it may be needed.
If you happen to be on an Apache based server (about 2/3 of internet's
www servers are based on Apache) an addition of an .htaccess config file
may be all you need to use the Apache X-bit hack for server side
includes.
<http://httpd.apache.org/>
If you can not configure your server to do includes for you, I recommend
using a preprocessor when you build your pages locally.
A very competent but still simple to use preprocessor is here...
<http://www.cine.net/~cberry/orbinfo.html>
<https://sourceforge.net/projects/orb/>
...Craig started on "Orb" some 10 years back and it is today a very
stable and functional piece of software, a breeze to use.
If you should be working in a *NIX environment (or one of its
implementations for Windows) you already have a "make" command available
in your system. That one could also be used but I admit that it is
definitely more tedious to set up a "make script" than it would be to
download and use Orb.
>Do I have to update every page on my site...
Nope, not if you follow any of the outlines above.
>...or does HTML have a #include directive?
Well, theoretically there is the equivalence of an #include directive in
the form of "expansion of defined entities" but the idea to include such
a wonderful piece of functionality in popular browsers just never made
it in the competition with blinking text, marquee's, frames and status
line modifications.
In case you are interested in what could have been available, had there
been some common sense to guide browser developments, you may want to
run through the following examples...
<http://www.css.nu/markup/markup-entities.html>
>Obviously; it is better to pull in the menu from a single external
>file...
Yes of course.
>...but can I do that with pure HTML?
Sorry; no.
>Hmmm, I could use PHP to do it; that would pull the menu in before
>webcrawlers ever got to see the page.
Yep; that's yet another solution that would work. But think about server
generated markup (as from PHP) such a resource would be "newly created"
each time it is requested. There is an impact on Internet caching of
documents from that, plus an extra load on servers to regenerate the
same page over and over again.
The Apache "X-Bithack" for server side includes is designed in a way
that still allows for Internet caching of documents.
>Yes, that looks like the solution...
Hmm, think twice please, for your own and your users sake.
>...unless there is a better one (this is surely a FAQ).
Of course it's an FAQ, here...
http://www.htmlhelp.org/faq/html/design.html#include-file

Signature
Rex
Windsun - 26 Mar 2005 03:47 GMT
see http://dwtig.com/
All links go in the DWT file
For a CSS menu see here (site not done, but menu mostly done)
http://www.solar-electric.com
-------------------------------------------------------------------------------
>>Honestly, I know nothing of CSS, although I tend to pick things up
>>quickly...
[quoted text clipped - 24 lines]
>>bothers me ...
>>What f I want to change my menu? Maybe just add a new item...
kchayka - 26 Mar 2005 15:43 GMT
> For a CSS menu see here (site not done, but menu mostly done)
>
> http://www.solar-electric.com
I would strongly suggest, however, that you avoid changing any font
properties on :hover
- font-weight
- font-style
- font-size
On the above page with my particular default text size, :hover on the
"Solar Charge Controls" link also changes line-wrapping. Mouseout is 2
lines, mouseover is 1 line. If the cursor happens to be on the second
line when :hover is triggered, it starts continuous rapid flashing.
Stuff like this can cause a seizure for some users. It's kinda
disturbing for the rest of us, too.
If you need to change something on :hover, I suggest sticking to colors.
And please don't top-post in this newsgroup. Thanks for your cooperation.

Signature
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Papa.Legba.666@gmail.com - 26 Mar 2005 09:21 GMT
Thanx a 1,000,000, Rex. That is one of the most compreshensive and
helpful answers which I have ever had. I will study it carefully (I
would never have thought about PHP being seen as a new page every time.
YTricky).
Thanks, thanks, thanks!
alistapart (www.alistapart.com) has some articles on using css to turn lists
into tabs and menus. You could try looking at some of those...
Regards,
Duncan
> I am a total lamer clueless stupid newbie (so please flame me).
>
[quoted text clipped - 20 lines]
> Yes, that looks like the solution, unless there is a better one (this
> is surely a FAQ).