CSS problem, etc. - [SOLVED]

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
slackbladder
Super Advanced
Super Advanced
Posts: 72
Joined: Fri Jul 01, 2005 3:04 pm

Post by slackbladder »

Try using the Milonic example on a blank html page (upload to your server) to see if its your page thats at fault
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I believe you're going to find that the problems are a result of putting the menu in a div. It really shouldn't be in a div. It has to do with the positioning, absolute, relative, and so on which in some browsers can conflict with the divs in the menu programming.

As I said, I don't really understand divs, but I made a page using your layout - rather it looks like your layout - and it does have your divs, most of them, but it uses a table for the top and the menu. You can test and see if that works for you as to the submenus.

I didn't really know how to position the divs so I just did test and change the top or left or margin or padding until it looked the same as to layout on your link and also looked the same in Netscape 7.1, Opera 7.54, Firefox 1.02. and IE 5.5

Link Removed



Hope this helps.

Ruth
Last edited by Ruth on Wed Sep 21, 2005 3:27 am, edited 1 time in total.
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

THANK YOU SO MUCH! This has helped so much! :) I really, really appreciate your help!

Just one more question - how do I change the coordinates of WHERE the menu (and the submenus) are placed? I can't seem to find coordinates in either the htm or js files.

THANKS AGAIN! You've been such a help!

CR
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi CR,

You're welcome :)

You can't change the 'coordinates' there are no coordinates, per se. The menu is place relatively, position="relative"; it's inside the table so it will always be there and it will 'shift' as the content shifts, just as the table shifts. But, the submenus will go where they are supposed to go :)

Can you tell me what you want to do as to moving it?

I dont' know if you noticed but I made new images, given that I was using the table layout. So your top image is actually two, the main image about as wide as you had it before, and then at the right is a little background image that will expand if the resolution is changed and the right side of that 'banner' will seem to extend so it goes all across the page no matter what the resolution. I also had to figure out how to do the image map, never done that before, because with the table the placement of the imagemap you had didn't work, it shifted those items too far right.

Anyway, if you could tell me what you need to do as to moving the menu, I can figure it out for you and post back.

Ruth
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

Thanks again for all your help!

Okay - here is the link for the page I reconstructed using your sample. http://www.net-aid.net/hidden/test.htm

I want my menu to line up with the green line to the left of it (the one where the search engine is inside of.)

Also - I notice that when you resize the page and the screen resolution is small, the menu disappears (well, the "About Us" does, anyway.) Is there a way to avoid this problem?

THANKS!

CR
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi CR,

I need to have you tell me some things.

EDIT: I deleted what i wrote....... See next post.

I can fix the 'hiding' problem.
Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi CR,

What's happening is that even though the table cell at the left of the menu is set to 157px to be the same size as the div, when you make the browser window smaller that cell shifts smaller. So, to fix it, you need to put in a transparent image and set its height to 1 and it's width to 157. I use a 1x1 transparent pixel image I name blank.gif.

You'd put it here

Code: Select all

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD class=2nd vAlign=top width=157 bgColor=#a0bf7d><img src="blank.gif" width="157" height="1" border="0"></TD>
    <TD class=2nd bgColor=#a0bf7d height=28>
As to the menu 'meeting' the div. If you do that then there will be problems in different browsers. The reason I have that little 5px table cell to the left of the menu is that if you get rid of it and make it line up in IE it will be a little bit covered by the div in Netscape and Firefox. It has to do with how the different browsers render text size. Even if you make it a fixed size that doesn't always work. The browsers tend to be about 5 pxs different so that's why I moved it, to make sure the div didn't cover any part of it in the other browsers.

Hope that helps.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

WHOOO HOOOO I fixed it so it will meet like you want :!:

Took me forever to figure out the increments and such.

OK, I am uploading a zip file. It has the new page, the new data file and the blank.gif image. new zip

So you know what I did:

1. I removed padding=4 from the data file and added

Code: Select all

rawcss="padding:3px 3px 4px 3px"; 
2. I changed separatorsize to 2 from 3

3. I added the blank.gif image to the table cell as shown above but made it 152px wide.

4. I changed the height of the td cell in which the table for the menu is from 28px to 30px

5. I added the following to the main menu, it has to have some text, but putting the headerbgcolor and headercolor to the same as the main menu offbgcolor makes it so it doesn't show. Using a non-breaking line space does not work in netscape, it acts as if there is nothing there.

Code: Select all

aI("text=a;headerbgcolor=#F1EB93;headercolor=#F1EB93;itemwidth=5px;separatorsize=0;type=header;");
Finally, I changed and you have to change the links to the menu. You are linking to the Milonic site, you need to link to your version of the menu. It's why I didn't include my menu program files in the zip file. I guess I must have somehow left in the milonic site links in the zipped page. Usually I don't do that, but everybody messes up sometimes :)

Anyway, doing it that way makes the layout look exactly the same in Netscape, Firefox and IE so get the zip file with page, image and new data file and test that.

Ruth
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Hi Ruth,

Thanks so much for the new files. They work beautifully. I only have one question: what do you mean by this - Finally, I changed and you have to change the links to the menu. You are linking to the Milonic site, you need to link to your version of the menu. It's why I didn't include my menu program files in the zip file. I guess I must have somehow left in the milonic site links in the zipped page. Usually I don't do that, but everybody messes up sometimes I can't seem to see where my links are incorrect, in either the HTML page or the JS file.

You have been a really big help. Thanks again!

CR
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi CR,

If you look in the first download, I must have 'zipped' the test page I put up instead of the one that was made for the zip. So, the one you put up didn't link to net-aid.net but to milonic site for the program files, the milonic_src.js etc. That's not acceptable for users [not that you did it, it was my error]. Users have to download and get a license for their own menu on their own site. I'm pretty sure I didn't put those links in the new file, but you need to check that and make sure you link to your files on your site.

Ruth
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

We haven't purchased a license yet, because we're still in our 40-day trial period. Is that why it might still be pointing to Milonic's site?

I know we're planning on purchasing sometime this week, so should I wait until then to change anything? I'll be using this menu throughout my entire site - would you recommend waiting to copy the script to these pages until we've purchased a license?

Thanks again for all your help!

CR
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

We have purchased the license for our site. Just an FYI.

Thanks,

CR
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi CR,

I'm so sorry, I didn't mean to imply you had to buy the license right now while you were in development. I was trying to say the links on your test page are incorrect because I made a mistake. When I put up a zip file with test pages for someone, I usually code the calls for the files as

Code: Select all

<script type="text/javascript" src="milonic_src.js"></script>	
<script	type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");		
  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); 
</script>
If you go to your test page and look at the call for those files you'll see that I forgot to change the links and they are still pointing at the files on the Milonic site.

You won't be unhappy with the menu in my opinion. I think it's the best one out there, so very versatile of design and cross-browser compatible.

Ruth
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

I think I understand...the test.htm page you sent me awhile ago had references to the milonic site. The cozmo_new.htm page doesn't, right? Here is what was in the cozmo_new.htm page

Code: Select all

<SCRIPT language=JavaScript src="milonic_src.js" 
type=text/javascript></SCRIPT>

<DIV class=milonic><A href="https://milonic.com/">JavaScript Menu, DHTML Menu 
Powered By Milonic</A></DIV>
<SCRIPT language=JavaScript>
_scr="SCRIPT"
if(ns4)_d.write("<"+_scr+" language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<"+_scr+" language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</SCRIPT>

<SCRIPT src="table_data_new.js" type=text/javascript></SCRIPT>
Is this correct? Do I need to do anything else to change this? Will I need to change the script when I save it to different subdirectories? Or will this script work just fine?

Thanks!

CozmoRaine
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi CR,

You need to make that script point to wherever you put your menu files.

So, let's assume you're making a special folder in your root directory called menu and you put all the menu files in it, then you need to make the links point to that folder, for example:

Code: Select all

<SCRIPT language=JavaScript src="http://www.yourdomian.com/menu/milonic_src.js" 
type=text/javascript></SCRIPT> 

<DIV class=milonic><A href="https://milonic.com/">JavaScript Menu, DHTML Menu 
Powered By Milonic</A></DIV> 
<SCRIPT language=JavaScript> 
_scr="SCRIPT" 
if(ns4)_d.write("<"+_scr+" language=JavaScript src=http://www.yourdomain.com/menu/mmenuns4.js><\/scr"+"ipt>"); 
  else _d.write("<"+_scr+" language=JavaScript src=http://www.yourdomain.com/menu/mmenudom.js><\/scr"+"ipt>"); 
</SCRIPT> 

<SCRIPT src="http://www.yourdomain.com/menu/table_data_new.js" type=text/javascript></SCRIPT>
I use full paths 'cause I have trouble with relative paths, you just need to make sure you point the link to wherever you have uploaded the menu files. I don't put the menu files in subdirectories because I use full path so I just leave all of the files in my 'menu' directory and call them from there on every page.

Ruth
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

Oh - okay - that all makes sense to me. I guess it's the same as the problem I had originally when it wasn't showing up on the subdirectory pages.

Hopefully I'm good to go now! You have been a LIFESAVER! THANK YOU, THANK YOU, THANK YOU! I appreciate all the time and energy you've spent on this with me!

You're the best! :)

CozmoRaine
CozmoRaine
Advanced
Advanced
Posts: 19
Joined: Mon Jul 25, 2005 5:20 pm

Post by CozmoRaine »

Ruth,

If I understand correctly - this is what I need to put on ALL of my pages (even those in subdirectories) because it will still point to the menu_data.js file that is in the MAIN directory:

Code: Select all

 	 
<SCRIPT language=JavaScript src="http://www.cpcumc.org/milonic_src.js" 
type=text/javascript></SCRIPT>

<DIV class=milonic><A href="https://milonic.com/">JavaScript Menu, DHTML Menu 
Powered By Milonic</A></DIV>
<SCRIPT language=JavaScript>
_scr="SCRIPT"
if(ns4)_d.write("<"+_scr+" language=JavaScript src=http://www.cpcumc.org/mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<"+_scr+" language=JavaScript src=http://www.cpcumc.org/mmenudom.js><\/scr"+"ipt>");
</SCRIPT>

<SCRIPT src="http://www.cpcumc.org/mmenu_data.js" type=text/javascript></SCRIPT>
Am I correct? (Fingers crossed)

;) CR
Post Reply