Hi all, been a while since I have attempted anything like this, and I'm a stumbler, I have very little knowledge about this, but can throw things together to look how I want, but not the way you guys can, so I am trying to create a better site than I can manage normally, so all pointers are welcome.

I dare say I will be having numerous issues as I get deeper, but for the moment it's a menu I am struggling with, I have got so far with this, but now can't seem to see whats wrong, not sure if there is a limit to how many sub menu's you can have, I added some just fine, but using the same method I am failing.

I have a vertical Spry menu, within that I have sub menus, and even some of those have sub menu's, I got this far by copying the succesful parts of the menu, but now I am trying to add more sub menu's, but am failing miserably, instead of creating the new sub menu, it is making it dissapear, the code is what I have, hopefully you will see what I'm trying to do, and be able to guide me as to whats wrong.

Sorry for a slow reply, never got a notification of one, anyway it doesn't surprise me to hear that, I was simply using the original code, duplicating it to create the same thing in further menu's, got a working result up to half way, but then it simply stopped allowing any kind of editing without making the layout mess up etc.

But to cover things a bit at a time, you comment on the </li> tag(s) missing, in that instance it was a typo, but in the final attempts (not shown here) I had done that on purpose, I'm sure when I was last helped here on a different project that it was said that in using CSS you didn't need to close every time, a single close could act for all of them, or am I getting mixed up somewhere ?

Now just to get this sorted in my head, am I right in thinking that the following code is used once only (each main menu anyway), to tell it there is a menu ?

<ul id="MenuBar1" class="MenuBarVertical">

And that the following code is used when you want to have another menu options part come out ? And this needs to be used on every heading you want further menu options to appear from ?

<a class="MenuBarItemSubmenu" href="#">

eg I am looking at opening Maintenance to Junk File Cleaners to 3 specific cleaners, would I need that code by each of the preceding headings ?

I had tried adding the second code with some success, but I found it only worked so many times, is there a limit for the amount of times you can use such codes in a menu ?Basically I'm looking (currently anyway) to have 4 menu options, each opening to between 3 and 5 options, and some of those to open out yet again to another say 3 or so options, is there a technical wouldn't be achievable ?

I am going to have a play with this to see if I can get on better than my last attempt, but I take it all items under a menu have to be set as <ul> ?Just wondering what different code would mean.

Thanks for the help.

Pullo
—
2012-10-23T14:34:29Z —
#5

8210GUY said:

Sorry for a slow reply, never got a notification of one

No problem, you can set your Default Thread Subscription Mode in your profile > Settings > General Settings.Alternatively, you can use the Thread Tools dropdown at the top of each thread to subscribe or unsubscribe from it.

8210GUY said:

I'm sure when I was last helped here on a different project that it was said that in using CSS you didn't need to close every time, a single close could act for all of them, or am I getting mixed up somewhere ?

You're getting mixed up. There are certain HTML tags which don't need closing under certain circumstances, e.g. <img> in HTML (as opposed to XHTML), but in general if you open a tag, you have to close it.

8210GUY said:

Now just to get this sorted in my head, am I right in thinking that the following code is used once only (each main menu anyway), to tell it there is a menu ?

<ul id="MenuBar1" class="MenuBarVertical">

Exactly! In it's basic form, the menu is nothing more than an unordered list (<ul>), with a unique id, in this case "MenuBar1".

8210GUY said:

And that the following code is used when you want to have another menu options part come out ? And this needs to be used on every heading you want further menu options to appear from ?

<a class="MenuBarItemSubmenu" href="#">

Not quite. A <li> tag is used to create a top-level menu item. E.g.:

<li><a href="#">Element 1</a></li>

The class of "MenuBarItemSubmenu" denotes that this menu item has further sub-menu points and is used to add some CSS styling as such.

Perhaps it would help to walk through a simple example and build it up to something more complicated:

Here I have done the same as above. Within the fourth top-level <li> element, I have added a <ul> element.Within this <ul> element's first <li> element, I have added a further <ul> element. This represents the third layer of navigation.

Hopefully, this gives you some insight into what's going on.If you have any more questions, just let me know.

8210GUY
—
2012-10-23T16:38:50Z —
#6

Yes I know about subscribing, and by default when you post you are subscribed, but I will double check under your guide (Thanks for that), but again no notification of this one, but the thread tag shows me as subscribed (only offers to unsubscribe).

I'm not surprised I'm mixing things up, I have the attention span of a goldfish at times but as with anything the more you do it the more it sticks, but I am a long way from understanding, but I can follow some things and apply logic (it works sometimes) to get kinds of results, but no where near what you guys could do.

Now the <li> tag, I was way off with that, I thought it simply meant it was a new line, nothing to do with menus, not directly anyway.The <ul> tag I understand is in relation to a specific type of list (unordered), and the href part, well I'd be lying if I said I understood, but I see it's use\eed in mentioning a specific point to get it showing on a web page.

The html examples you give I see very clearly whats going on, and thats what I was trying to emulate, but kept failing, each time I got so far, adding the next bit either put the page out, or made other bits of the menu disappear, and I just couldn't see what I was doing wrong, probably just a mass of text making me go blind lol, but that was exactly wheat I was trying to do, albeit badly.

Now the sub menu heading, I think I am right in my thinking, but probably didn't say it clearly, bit without that the menu wont show the parts you want to show within that sub heading, so from what I can draw from this, I wasn't to far off the mark in my understanding, although I probably didn't come across clearly enough with it, but somewhere between my brain and my typing something kept going wrong lol.

Anyway, I came across an automated way to do what I was trying to do, I found showing the right tab made it's elements visible, then I was able to just change headings etc in there, and it came out a treat, for me anyway, not sure if you'd agree but it does what I wanted now, I just have to mess around with colours and text size now, fortunately thats much easier than this was, but here is my current list:-

Yes I know about subscribing, and by default when you post you are subscribed, but I will double check under your guide (Thanks for that), but again no notification of this one, but the thread tag shows me as subscribed (only offers to unsubscribe).

The only thing I can think of here, is that if you get one email notification, you won't get any more until you click on the link in that email, that takes you to the thread. Could that maybe be the problem?

8210GUY said:

... the href part, well I'd be lying if I said I understood, but I see it's use\eed in mentioning a specific point to get it showing on a web page.

This is important. Contained within the <li> tag is an <a> tag (anchor tag). The href attribute of the <a> tag specifies the address of the page the link goes to.It can either be absolute, e.g.:

Still no notification, will try logging out then back in, got a vague memory of that working on occasions for some forum issues, but it's set to instant notifications in my settings, currently all I get is the top of the web page saying I have got x notifications.

I wish I could say I did that coding, but alas, I simply found a way to expose a menu to allow me to do that easily, but it took me a few hours to find how to change the text area size so it fitted inside the text areas, yet earlier I stumbled on it easily lol, but another few dozen more rebuilds of this so far, and I will get to see what certain functions can do to change parts of it.But your html examples (the latter of them) is exactly what I will be doing, and I'm glad to say thats the one bit I can manage easily lol.

My next battle is to make the page so it shows that way on ALL other pages, from memory you can make it so only the content of the main body changes, speeding up load times, or am I getting mixed up again ?

Many Thanks for this, 1 battle down, several more to go lol. :nono::lol:

Pullo
—
2012-10-24T05:43:11Z —
#9

8210GUY said:

My next battle is to make the page so it shows that way on ALL other pages, from memory you can make it so only the content of the main body changes, speeding up load times, or am I getting mixed up again ?

Although this is technically possibly, it's normal for you to repeat the navigation code on each page of your site.There are (at least) two reasons for this:

You normally want to give the user some idea of where they find themselves within the menu hierarchy, e.g. by highlighting the currently selected menu item.

If you are using relative paths (e.g. ../contact/contact.html), then the paths to the various pages from within the navigation will be different from every page.

ralphm
—
2012-10-24T08:40:09Z —
#10

Pullo said:

If you are using relative paths (e.g. ../contact/contact.html), then the paths to the various pages from within the navigation will be different from every page.

Yes, it's better to use "root relative" paths, such as href="/contact/" so that the same menu code will work on all pages. And the ideal is to store the menu code in one place and "include" it onto each page via a PHP include or similar.

TechnoBear
—
2012-10-24T11:36:45Z —
#11

[ot]

8210GUY said:

Still no notification, will try logging out then back in, got a vague memory of that working on occasions for some forum issues, but it's set to instant notifications in my settings, currently all I get is the top of the web page saying I have got x notifications.

For some reason, the notification system occasionally stops sending e-mails to a particular address. It's nothing personal (I hope - because it's doing it to me for the second time :)). If you send a PM to @HAWK, she should be able to sort it out for you.[/ot]

Pullo
—
2012-10-24T15:08:42Z —
#12

Hi Ralph,

I have two questions to what you wrote:

ralph_m said:

Yes, it's better to use "root relative" paths, such as href="/contact/" so that the same menu code will work on all pages.

This is untenable on your local machine, as Windows at least, will consider your document root to be C:/ and not whatever folder you are actually working in. Therefore <a href="/contact/"> will always lead you to file:///C:/contact/. Do you know of any way around this problem (apart from obviously working in C:/)?

ralph_m said:

And the ideal is to store the menu code in one place and "include" it onto each page via a PHP include or similar.

In this case how would you go about highlighting the page within the current navigation hierarchy upon which the user currently finds themselves?

TechnoBear
—
2012-10-24T15:23:04Z —
#13

Pullo said:

In this case how would you go about highlighting the page within the current navigation hierarchy upon which the user currently finds themselves?

This is untenable on your local machine, as Windows at least, will consider your document root to be C:/ and not whatever folder you are actually working in. Therefore <a href="/contact/"> will always lead you to file:///C:/contact/. Do you know of any way around this problem (apart from obviously working in C:/)?

Yes, it's the same on Mac. But the easy way around it is to set up a virtual server on your computer, using XAMPP (PC) or MAMP (Mac). It only takes a few minutes to set up, and then you can set everything up just as you would online.

In this case how would you go about highlighting the page within the current navigation hierarchy upon which the user currently finds themselves?

You can do it with PHP in various ways one of which TB posted above), with CSS, or with JavaSCript. Here is a thread listing a few solutions:

Yes, it's the same on Mac. But the easy way around it is to set up a virtual server on your computer, using XAMPP (PC) or MAMP (Mac). It only takes a few minutes to set up, and then you can set everything up just as you would online.

Thanks Ralph, as obvious as that is, I've never really considered doing that for a project involving just static HTML files (as opposed to a project using say, WordPress)I'll give that some thought.

ralphm
—
2012-10-25T08:28:50Z —
#17

Pullo said:

I've never really considered doing that for a project involving just static HTML files (as opposed to a project using say, WordPress)

Yep, it works nicely for both static sites and sites using a CMS like WordPress. It's handy because it means you can develop the whole thing locally and then upload when you're ready. Of course, you can just install PHP, Apache, MySQL etc. on your PC as well, but it's much quicker to use a package like those I mentioned.

8210GUY
—
2012-10-25T15:36:54Z —
#18

Pullo said:

Although this is technically possibly, it's normal for you to repeat the navigation code on each page of your site.There are (at least) two reasons for this:

You normally want to give the user some idea of where they find themselves within the menu hierarchy, e.g. by highlighting the currently selected menu item.

If you are using relative paths (e.g. ../contact/contact.html), then the paths to the various pages from within the navigation will be different from every page.

I thought it would be worth it as it speeds up loading pages, each page would have a heading on it so they would know what page they are on, but I will just create a page as a template then each new page add the content then save as to save having to do it fresh each time, it's what I used to do anyway, just thought it was worth looking at this possibility.

ralph_m said:

Yes, it's better to use "root relative" paths, such as href="/contact/" so that the same menu code will work on all pages. And the ideal is to store the menu code in one place and "include" it onto each page via a PHP include or similar.

I'm struggling to understand up to this point, but your advice (as great as it probably is) is way over my head, I fear I have a way to go before getting even close to the methods you suggest, I just hope one day to be able to use such info, but Thanks for the input.

TechnoBear said:

Off Topic:

For some reason, the notification system occasionally stops sending e-mails to a particular address. It's nothing personal (I hope - because it's doing it to me for the second time :)). If you send a PM to @HAWK, she should be able to sort it out for you.

I will try changing email addresses to see if that cures it, if it doesn't then I will follow your advice, Thanks.

Thanks for the input all, I hope to get to grips with it one day, for now I will do my best to follow the advice.

8210GUY
—
2012-10-28T21:36:53Z —
#19

Great stuff I can post again lol, Thanks to Hawk for sorting the account for me.

Right several dozen rebuilds and I have got what I hope is a good handle on it now, still way off understanding as such, but hopefully I'm starting to pick it up a bit, enough to be moving forward a bit anyway, so I have been trying to get the banner showing correctly, as it seems to move to the left when viewing via different screens, even though I set it to centre, I have also been struggling with adding a main content div, I've managed to get a semi reasonable result after many attempts, but it's still not right.

The first battle was placing it, the only way I finally got it to position to the right of the menu was to drag and drop it, prior to that it was either adding into the menu, or starting down under the menu, so tips on how to approach placing these things would be great, as I know there is a more correct way to do it, but no matter how I tried to place the cursor on the page to locate the insertion point, it never went where I wanted (to the right of the menu), I just hope I can follow it when you guys explain it lol, but please let me know at what point I should stop pasting code, I totally appreciate it can eat resources, and I can upload it if needed, but here it is so far:-