Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:08

valign text in menu not working


Poster: techtrader
Dated: Monday April 17 2006 - 21:59:08 BST

I am using the Static Background Item Images menu. In the example on Milonic's site the text is in the middle of the buttons (top to bottom). When I look at the code for this menu I don't see anything that forces the text to this position. On my menu system the text aligns to the top. I tried placing valign='center' or "center" in the menustyle code in menu_data.js. I also tried changing the separator color for the buttons in the main menu with separatorcolor='#ffffff" and "#ffffff". Nothing happens. I'm using a IIS test server with Windows XL Pro. Is it in the menustyle/submenustyle sections of Menu_Data.js where I make these changes? I am using the embedded_main_menu.js method of calling the main menu and have also tried inserting separatorcolor in here as well. No Luck

Cheers,
Linus


Poster: John
Dated: Monday April 17 2006 - 23:10:05 BST

How 'bout a URL (as requested)? Would be a big help.

valign


Poster: techtrader
Dated: Monday April 17 2006 - 23:54:31 BST

Hi John

I'm not sure how to do that at this point. I'm working on this on a test server not on my website. Because the menu system on my website is a Flash/XML menu it works throughout the whole site, change one thing in the flash menu and it propagates throughout the site. If I sent up the page I'm working on
I would think it would be in conflict with the Flash menu. I'm not sure how to make the DHTML menu viewable to you on my computer without everyone and anyone having access. I was hoping for an answer before I swapped out the menu systems and uploaded to my web host.
There isn't much different between my code and the example code on Milonic's examples. Their example code does not show how the text on the buttons is aligned top, middle, bottom. Except for the links it is like this:
http://www.milonic.com/menusample71.php


Cheers,
Linus


Poster: vikenk
Dated: Tuesday April 18 2006 - 0:12:14 BST

I'll try to make a suggestion, but can't guarratee that it'll work since I can't see the site:

There are two things you could try, and both are CSS related. SInce the menu is table-based, you could style the menu TD with styles. Create a style in the style sheet and apply it to the menu. In your CSS:
Code:
.menuon td {
  vertical-align: top;
}

.menuoff td {
  vertical-align: top;
}


Then, in the menu_data.js file put:
Code:
with(MainMenu=new mm_style()){
offclass="menuoff";
onclass="menuon";
fontfamily="Arial, Tahoma, Verdana";
fontsize="110%";
blah, blah, blah;
yada, yada, yada;


The other thing is to put "raw" css directly in the menu. I've never done it this way, but the idea is that you put a line in the menu style that starts with "rawcss". So, it would be:

Code:
rawcss="td { vertical align: top }";


Give it a try and get back to us.

valign


Poster: techtrader
Dated: Tuesday April 18 2006 - 0:36:26 BST

Hi

Appreciate the effort but I thought the concept of this menu system was one only had to insert Style Properties into the menustyle or submenustyle to make changes thus the Styles Properties Quick Reference Guide. Examples being valign, align, bordercolor etc. Am I wrong in thinking this?

Cheers,
Linus


Poster: Ruth
Dated: Tuesday April 18 2006 - 8:39:30 BST

Hi,

No you're not wrong, but without seeing the site we cannot see what might be causing the valign to not work. For example, if you have a css generic code for table, td, tr that will affect the menu since part of it is made up of tables. There might be other reasons and we can't tell without a page to check. If you absolutely cannot post a page, then I suggest thqat you post the html page code here, any css coding, and your menu data file so we can try to create the page and see what's going on. Also, we need to know the version of the menu you are using.

Ruth


Poster: Migru
Dated: Tuesday April 18 2006 - 10:49:57 BST

Hi

one short comment only:

Quote:
I tried placing valign='center' or "center" i


The combination "valign" with "center" never works.
valign should work with top,middle or bottom.

http://www.milonic.com/menuproperties.php

center is to be used for the horizontal alignment (align) only.
valign controlls the vertical alignment.

Michael

valign


Poster: techtrader
Dated: Tuesday April 18 2006 - 14:04:33 BST

Hi Ruth

As I said earlier the code is identical to the example code, I just bought the menu and set it up, now I'm trying to make it more to my liking so I really haven't changed it. Software ver. 5.746
http://www.milonic.com/menusample71.php - I'm not that CSS literate but I don't see in the example code or the code I downloaded how the text on the buttons is centered top to bottom. On the example on the Milonic site it is in the center, the code I downloaded it is on the top. Neither piece of code indicated how it was put there. I saw valign in the in the Quick Reference Guide and tried pluggung it into the - with (menustyle=new mm_style()) section. Also the separatorcolor style property. If this explaination fails then I will paste my code but it is the same as Milonic's code. How did Milonic get the text in the middle, the menu seperators to be orange/brown not blue or any other color. I don't see these settings in their code.

Now I've run into another potential problem. The reason I am changing menu systems is that the one I'm presently using doesn't like search engines. the google page rank for my video equipment page was 0. I now see that these menu's can't be searched either. That I need to use a <noscript> tag. Any examples of this?

Cheers,
Linus Sagadore

Re: valign


Poster: vikenk
Dated: Tuesday April 18 2006 - 14:22:10 BST

techtrader wrote:
Now I've run into another potential problem. The reason I am changing menu systems is that the one I'm presently using doesn't like search engines. the google page rank for my video equipment page was 0. I now see that these menu's can't be searched either. That I need to use a <noscript> tag. Any examples of this?


Linus,

To my knowlwedge, search engines do not index Javascript based code. Therefore, in theory, no JS based menu system will be search engine friendly. I have incorporated a NOSCRIPT system in my site for two reasons: 1) Those who turn off or don't have Javascript will still be able to navigate my site, and 2) The site becomes search engine friendly.

Other things you can do: 1) Use the Milonic list-based menu. Basically, you create a UL and the menu builds its self accoriding to the UL, and 2) Provide a Site Map link on your home page. Search engines will then follow the link to the site map page, which, of course, will have all the links in your site.

See my home page for the NOSCRIPT tags: http://www.vikenk.com


Poster: Migru
Dated: Tuesday April 18 2006 - 14:29:28 BST

Hi

Quote:
On the example on the Milonic site it is in the center, the code I downloaded it is on the top.


donĀ“t know what you have downloaded, but just reproduced a download of sample 71. It is centered, vertically by default and horizontally by setting an align=center; in each item.
And there is no orange/brown separator set to that color, because there is a separatorimage

Code:
separatorimage="disco_sep.gif";


You can have a look at it here:

http://www.milonic.com/menuimages/disco_sep.gif

Just for fun included a

Code:
valign=top;


into one aI("..; " ) ; -string of the main menu (home) and it works, as it should !!

If you place this into the styles definitions, it should look like

valign="middle"; // "top"; or "bottom";



Michael


Poster: Ruth
Dated: Tuesday April 18 2006 - 21:45:03 BST

Hi,

Yes, you can use the noscript tags, as Vikenk does, and most do. That should fix not only the search engine but anyone who has js off would still have links to your site.

You can also try the listbased menu which creates the menu from a list, that way the list is always available and search engines read lists I believe.

There is a listbased menu in the menu download under the extras folder.

Ruth