View Full Version : Menu's and content - Advice needed

07-15-2007, 06:12 PM
Hey people,

Soooo I'm continuing my small strides into the world of HTML and CSS creation and i've hit a problem, not site ending but an annoyance.

The issue;


This weblink (and please ignore the colour scheme its just so I don't see white on white :]), has a second menu nestled below the main navigation.
The only issue is, as I add more events to the page This menu will need updating ...

I would like the "eventsnav" (for those who opened the source) menu to appear in all pages I make about events to allow easy navigation... but If i add another event I would have to open up all previous events pages and copy the new menu code in ... so it has all the links ...

Is there an easier way to do what I need ?

Noob in distress


P.S and I know the Website lacks ... well everything :P

07-16-2007, 10:12 AM
The easiest would be to take care of this server side, either by employing Server Side Includes (http://en.wikipedia.org/wiki/Server_Side_Includes) (SSI; only on Apache) or using the include mechanism found in most server side scripting languages.

Can you tell if your hosting provider supports a server side scripting language, for instance PHP which is rather popular nowadays?

07-16-2007, 10:34 AM
Taking a look at your code you have a way to go in terms of semantics and 'proper' coding, so although you did not ask I'll give you a few tips anyways ;)

Firstly, remove the comments before the doctype. This will cause IE to render in 'quirks mode' giving you all sorts of problems when you try to build a cross-browser compatible site. You're using HTML 4.01 Strict, which is good, but that also means you do not need /> to close those meta tags in your head section.

Next up... your navigation. Because you are listing the links to the other pages of your site, you should really be using a list (i.e. <ul> with <li>'s for all of the links). This is what we consider 'semantic' code, or a paragraph should be in a <p> tag, a list in a <ul>, a heading using the <h#> tags etc. etc. I can also see that you have 4 classes, as well as an id for this list... and for some reason you have put the whole thing in a, <h3> tag even though it is not a heading, and then put each link in it's own <p> even though they are not paragraphs! You could simply this to ONE <ul> with an id, and a bunch of <li>'s for your links with a class to style them.

If you validate your page you'll see some errors that need correct, which I have actually sorted above. But also, I can't see a closing </html>, which doesn't seem to affect the page, but I'd put it in if I were you.

07-17-2007, 12:35 AM
Okay, I've solved the problems listed by Ahallicks, and the site now seems to pass validation ... I miracle onto itself :)
(Will upload the updated page once i screw with the new content i want to add, for now changes are <p>#s to UL and listed contents, nothing big)

To answer ronaldb66 : Server support seems to be all php and mysql related gubbins, since the blog script now works!

So i'm ready to try and understand any advice or links you might have.