Forum Moderators: open

Message Too Old, No Replies

Dreamweaver js. file

script src=

         

dhol2

2:33 pm on May 7, 2011 (gmt 0)

10+ Year Member



Hello,

I have designed a website in Dreamweaver.
URL:
www.globalbrokers.com.hk

in the source code, it refers to java as:

</style>
<script src="file:///E|/N E T W O R K S T O R A G E/DWsite/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="file:///E|/N E T W O R K S T O R A G E/DWsite/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="file:///E|/N E T W O R K S T O R A G E/DWsite/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>

I had to adapt the website, and I can't redirect the js. file to the root spryassets folder. I am unsure if I have posted this query in the correct space. Apologies in advance.

Could someone please assist me in redirecting that code to the correct Src

Thanks in advance

Dave

robzilla

2:41 pm on May 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Remove
file:///E|/N E T W O R K S T O R A G E/DWsite
(which points to your computer's hard drive instead of the document root of your domain) from all file paths in the HTML code you posted, so that you end up with this:
</style>
<script src="/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>

You can also use an absolute path to these files, as such:
</style>
<script src="http://www.example.com/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="http://www.example.com/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="http://www.example.com/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>

dhol2

2:52 pm on May 7, 2011 (gmt 0)

10+ Year Member



Thank you so much for your help.
I have adjusted the code as recomended, I have attempted this before, however, the new code only show's the last menu item. "contacts". as opposed to Home, about us etc.

Could you please assist further

Regards
Dave

dhol2

3:33 pm on May 7, 2011 (gmt 0)

10+ Year Member



At least that's the case in firefox. IE has all of the horizontel menu's.

robzilla

3:42 pm on May 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Firstly, you are loading two separate stylesheet files: SpryMenuBarHorizontal.css and SpryMenuBarVertical.css. If you have only one menu bar, one of those files is redundant. If you use the horizontal version of the menu bar, you can remove the stylesheet for the vertical one, or vice versa.

When only the last of a series of list items is displayed, it is often a positioning error where all items are stacked on top of one another, as it were. Try altering your SpryMenuBarHorizontal.css file where it says
ul.MenuBarHorizontal li
, changing
position: absolute;
to
position: relative;


Setting
position
to
relative
positions each item relative to the previous item, so that ultimately they should all line up nicely. When each item has
position
set to
absolute
, they will disregard the positioning of any succeeding and preceeding items, and default to the top left corner of the enveloping block-level element -- so that they all overlap.

rainborick

11:23 pm on May 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think it's more accurate to say that the position of an element set to position:relative is calculated from that element's position in the normal document flow, and an element set to position:absolute is removed from the normal document flow and its position is calculated from the parent positioned element.