Controlling SYS_MENU and SUB_MENU locations Controlling SYS_MENU and SUB_MENU locations
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Controlling SYS_MENU and SUB_MENU locations

Started by v8central, January 26, 2008, 07:59:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

v8central

Hi all,

I'm creating my own theme, and I need to get both of these menus on the one line.  I have changed them both from a UL (unordered list) to 2 tables which should sit together on the page, but they don't.  At the moment both menus have all the proper table code, should I remove the </table> from SYS_MENU and remove the <table> from the SUB_MENU ?

Is there an easier way to do this ?

v8central

OK, after a lot more searching and reading and testing I can't find anything wrong with what I've done, and it seems to work well regardless of whether I'm logged in or logged out.

I still need to validate the HTML to make sure all my tags are good, but it seems ok so far.

Joachim Müller

Post a link to your gallery and zip up your custom theme folder and attach the zip archive to your posting (using "additional options" when composing your message).

v8central

Thanks for ther reply, the gallery is in a password protected area at the moment (I can PM the details if needed but I don't want to post them publicly at the moment), but the template files are attached.  I started with the 2bornot2b template and hacked it, and I'm still hacking the style sheet :)

Joachim Müller

First of all, please do in the future exactly as suggested: I asked for a zip of the custom theme folder, not for a zip that contains the content of that folder. There's a reason why I ask for this and it makes a big difference.
I renamed your theme to avoid collissions and attached it. Unzip the content of the archive I attached into your themes folder, then switch to the new theme using ?theme=2bornot2b_custom as additional URL parameter.
You have made several implementation flaws, please review my changes. Why one earth did you clutter the tableless 2bornot2b with needless tables that don't do anything usefull? I fixed this (at least part of it).
There are very good resons why you shouldn't use a table when you can use an unordered list that is aligned horizontally.


v8central

Of course I can't design a theme as good as you have done, because I do not know as much as you do ... that's why I'm here to learn.

BUT, there are reasons why I have the tables at the top, partly because I don't know how to do it perfectly without tables and partly to fit into the existing site design that uses tables for the header area.

You say the theme is tableless, but there is a LOT of tables in there that I haven't added.  I would not call the theme tableless at all.

I can see that you have removed the table and put it back to a UL, but the UL has some space around it in the header that I still can't get rid of.  Anyway, as you can see, I've got a lot to learn, but I can't afford to have any whitespace between the banner image and the menubar.

v8central

I forgot to add, the UL makes it right justified as well, I'm trying to track down the reason for that now.

Joachim Müller

Assign the needed CSS properties to the div container that wraps the menu then.