Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape .style.left

Status
Not open for further replies.

Pinpoint

Programmer
Dec 23, 2001
49
GB
Hi,

I am developing a drop-down menu. To position the drop down boxes I am setting (item).style.left in IE, but Netscape ignores it. Same with .style.top . Any suggestions ?

Secondly: Can I have an href link to an mp3 file which instead of automatically invoking the media player, allows the user to download the file ?

Thanks,

Pinpoint
 
Pinpoint,

As well as setting style.left and/or style.top, have you also tried setting "position:absolute" or "position:relative" ? If this doesn't work, try enclosing the drop-down in a DIV tag and applying those properties to the DIV instead of the list.

As far as I know, you can't change the browser's default behaviour for certain registered file types. You could change the extension to something other than ".mp3", but I think that would be a bad solution. Also, forcing the user to download the mp3 instead of playing it might be considered by some to be bad coding practice - since a lot of users are aware of right-clicking links to be able to "save as" (and this is most likely the reason that the "target" attribute was removed from the HTML strict DTD, IMHO)...

Dan
 
Dan, thanks.

I was already using a div with position:absolute, so it was easy to add in the top/left to the div.style as you suggest.

Re downloading the .mp3. I zipped one up, and the .zip file was larger than the .mp3. So I thought as I want to offer site visitors the option to play the .mp3 file (which may be quite large) or to download it without having to start their player and click 'file/save-as', it would be handy to be able to download the .mp3 rather than a .zip. If this isnt possible I will just href the .zip too and leave it to the user to decide how they want to download.

Pinpoint
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top