cancel
Showing results for 
Search instead for 
Did you mean: 

problem alligning menu made in cofecup dhtml menu builder

stakesbyarmsfc
Dabbler
Posts: 11
Registered: ‎07-05-2008

problem alligning menu made in cofecup dhtml menu builder

hi people
just a quick question
www.stakesbyarmsfc.co.uk
i am testing this for use on a different site but how can i alter the code so the image is at the top of the page and the menu as close to underneath as possible?
the builde gies you choice of top middle bottom or static which areno good
can it be alterted?
8 REPLIES
Denzil
Grafter
Posts: 1,733
Registered: ‎31-07-2007

Re: problem alligning menu made in cofecup dhtml menu builder

The first thing I would do is put the script in a file separate to the html, as including it makes the html much bigger and harder to follow. Save the script as, for example, menu.js, and add a line to the html to say,
<script src="menu.js" type="text/javascript"></script>
In the scrpit is a line
var MenuVerticalCentered='middle'; // Menu vertical position 'top', 'middle','bottom' or static
Presumably this is the one you refer to? What happens if you change 'middle' to 'top'?
Denzil
Grafter
Posts: 1,733
Registered: ‎31-07-2007

Re: problem alligning menu made in cofecup dhtml menu builder

OK, I have just had a play with it. Try this.
Change the 'middle' to 'top' as above. Then in this line
var StartTop=1; // Menu offset x coordinate
change the 1 to 230. This aligns it at the top, but spaces it 230 pixels down, just missing your header image.
stakesbyarmsfc
Dabbler
Posts: 11
Registered: ‎07-05-2008

Re: problem alligning menu made in cofecup dhtml menu builder

hi denzil cheers for the rapdi response
i am going to try that now
one problem , i did what you said made the java script a separate file but now it wont load up anywhere
can you advise why
i added your line of code but it doesnt work look on www.stakesbyarmsfc.co.uk
thanks
Denzil
Grafter
Posts: 1,733
Registered: ‎31-07-2007

Re: problem alligning menu made in cofecup dhtml menu builder

The line <script src="menu.js" type="text/javascript"></script> should be after the <img border... line but before the </body>.
Also have you uploaded the js file to your webspace? It will need to be in the same folder as your index.html so the script line can find it.
Also, have you given the file the same name as the link, i.e. menu.js?
Also, forgive me if you think I am asking the obvious,  but when you saved the script it should not include any html tags, just the java code.
Another big advantage of having a separate js file is that it is much easier to reproduce the menu on different pages, because you only need to add the single <script>...</script> line to each page.
If you are still having problems send me a PM with your email address and I'll send you the two files (js and html).
Denzil
Grafter
Posts: 1,733
Registered: ‎31-07-2007

Re: problem alligning menu made in cofecup dhtml menu builder

As requested I have sent you the two files. Let's hope it works!
stakesbyarmsfc
Dabbler
Posts: 11
Registered: ‎07-05-2008

Re: problem alligning menu made in cofecup dhtml menu builder

hi DEnzil
files not received mate
Denzil
Grafter
Posts: 1,733
Registered: ‎31-07-2007

Re: problem alligning menu made in cofecup dhtml menu builder

Umm, OK. I'll check when I get home later. I have just had a look at your menu.js anyway and I think I see the problem. You have included the html tags at the beginning and end. Open menu.js in Notepad and remove these lines from the top:
<html><head></head><body>
<script type='text/javascript'>
and these lines from the bottom:
</script>
<noscript>Your browser does not support script</noscript>
<!-- REST OF BODY CONTENT BELOW HERE -->
</body></html>
Then open your index.html in Notepad and move the line
<script src="menu.js" type="text/javascript"></script>
one line up so it is above the </body>
That should work. I will check I sent the email correctly as well.
Denzil
Grafter
Posts: 1,733
Registered: ‎31-07-2007

Re: problem alligning menu made in cofecup dhtml menu builder

Fool that I am, I just hit "Reply", thus sending the email to the forum and not to you. Apologies for that. However, suddenly you seem to have a whole website, so I guess you gave up on the menu and don't need it any more?