473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Drop-down menu works in IE but not Firefox, Safari, etc.

I'm a school teacher trying to get a web page update working doing a drop-down menu.

The code works at http://hms.sps.lane.edu but the update that uses more css, including "navigation body" "wrapper" and "header" at http://hms.sps.lane.edu/new/, the drop-down menu only works in IE. I don't understand enough of css to debug this.

Hoping someone can help.

Expand|Select|Wrap|Line Numbers
  1. #navigation-wrapper {
  2.     float: left;
  3.     margin-left: 42px;
  4.     width: 205px;
  5.     font-size: .8em;
  6. }
  7. #navigation-header {
  8.     height: 12px;
  9.     background-image: url(../images/nav-header.gif);
  10.     background-repeat: no-repeat;
  11.     background-position: top;
  12. }
  13. #navigation-body {
  14.     background-image: url(../images/nav-bg.gif);
  15.     background-repeat: no-repeat;
  16.     background-position: bottom;
  17. }
  18. #navigation-wrapper ul {
  19.     margin: 0;
  20.     padding: .5em 0 1em 2.25em;
  21. }
  22. #navigation-wrapper ul li {
  23.     margin: 0;
  24.     padding: 0 0 .5em 0;
  25.     list-style-type: none;
  26. }
  27. #navigation-wrapper a {
  28.     color: #1e7e1c;
  29.     font-weight: bold;
  30.     text-decoration: none;
  31. }
  32. #navigation-wrapper a:hover {
  33.     color: #0000FF;
  34. }
  35. #navigation-wrapper a:visited {
  36.     color: #1e7e1c;
  37.     font-weight: bold;
  38.     text-decoration: none;
  39. }
  40. .dropmenu {
  41.     position: absolute;
  42.     top: 0;
  43.     left: -500px;
  44.     background-color: white;
  45.     border: 1px solid #999;
  46.     border-bottom-width: 0;
  47.     font-family: Arial, Helvetica, sans-serif;
  48.     font-size: 10pt;
  49.     width: 155px;
  50.     font-weight: normal;
  51.     line-height: 14px;
  52.     z-index: 100;
  53. }
  54. .dropmenu ul {
  55.    margin: 0;
  56.    padding: 0;
  57.    list-style-type: none;
  58. }
  59. .dropmenu li {
  60.    display: inline;
  61. }
  62. .dropmenu a, .dropmenu a:visited, .dropmenu a:active {
  63.     width: 100%;
  64.     display: block;
  65.     text-indent: 3px;
  66.     border-bottom: 1px solid #999;
  67.     padding: 1px 0;
  68.     text-decoration: none;
  69.     font-weight: normal;
  70.     color: #1e7e1c;
  71. }
  72. .dropmenu a:hover {
  73.     background-color: #CCC;
  74.     color: #124C11;
  75.     font-family: Arial, Helvetica, sans-serif;
  76.     font-size: 10pt;
  77.     font-weight: normal;
  78.     line-height: 14px;
  79. }
  80.  
Apr 27 '10 #1

✓ answered by Dormilich

the Error Console reports an unknown variable (jQuery is not defined, HMSjavascript.js (line 245)) and tons of CSS errors with respect to some top/left statements.

the top/left statements require a unit to be passed*, not only a number.
Expand|Select|Wrap|Line Numbers
  1. function moveObjectTo(objectID,x,y) {
  2.     var el = getElement(objectID);
  3.     el.style.left = x + "px";
  4.     el.style.top = y + "px";
Hooray for Firebug!



* - there’s a crucial difference between "1px" and "1em" or "1%" …

5 3631
drhowarddrfine
7,435 Expert 4TB
The problem will lie with that you used IE to initially test this instead of one of the other more modern browsers hence the reason it doesn't work with them. You also have 119 XHTML errors but changing the doctype to HTML reduces that to 28 or so.

In your CSS, you have two errors from using "mso" properties which do not exist. And as long as I'm harping on you, tables should never be used for layout.

All that said, I would validate for that list of html errors, the most significant being misplaced tags for body and other elements. You get a hundred more errors using the xhtml doctype because that is case sensitive and other relatively minor problems that come from using that.
Apr 28 '10 #2
@drhowarddrfine
Thanks for the info and the quick response. I did some cleaning and removing of tables on the http://hms.sps.lane.edu/new/ site BUT the drop down menus are still only working in IE.

(I don't yet know how to format the 3 columns on the first page w/o using tables, but removed the tables in the navigation bar.)
Apr 28 '10 #3
drhowarddrfine
7,435 Expert 4TB
After looking at this again, I think this might actually be a javascript issue. I'll have one of them look at it.
Apr 28 '10 #4
Dormilich
8,658 Expert Mod 8TB
the Error Console reports an unknown variable (jQuery is not defined, HMSjavascript.js (line 245)) and tons of CSS errors with respect to some top/left statements.

the top/left statements require a unit to be passed*, not only a number.
Expand|Select|Wrap|Line Numbers
  1. function moveObjectTo(objectID,x,y) {
  2.     var el = getElement(objectID);
  3.     el.style.left = x + "px";
  4.     el.style.top = y + "px";
Hooray for Firebug!



* - there’s a crucial difference between "1px" and "1em" or "1%" …
Apr 28 '10 #5
@Dormilich
Woo hoo! That fixed it!!!! Thank you. I'm just a middle school teacher with only a little knowledge. I would NOT have found that. Thanks so much!

By the way, how do I fix those "tons of CSS errors with respect to some top/left statements" you mentioned? I don't know what that means?
Apr 28 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: riehe | last post by:
Dear all I want to drop a node from a nodegroup. Can someone confirm if its enough to redistribute a node group with a partition map which doesn't include the node to be dropped? I can't see...
1
by: Ian Dobson | last post by:
Hi, I need to drop a schema from a database but it has 400 tables in it. Is there an easy way to do it other than drop table schema1.table1 drop table schema1.table2 etc.. to 400 and then drop...
10
by: BuddhaBuddy | last post by:
Platform is DB2/NT 7.2.9 The table was created like this: CREATE TABLE MYTEST ( MYTESTOID bigint not null primary key, FK_OTHEROID bigint not null references other, FK_ANOTHEROID bigint not...
0
by: Lauren Quantrell | last post by:
I'm trying to drop a file from Windows Explorer (or desktop, etc.) onto a field in Access2K and capture the full file path. I found an posting below that says this is possible but I cannot...
8
by: WindAndWaves | last post by:
Hi everyone, Has anyone got any experience with drop and drag in Access? I would like to make a calendar style form where my users can drop and drag appointments.... I am using Access 2003...
3
by: VB Programmer | last post by:
In VB.NET 2005 (winform) any sample code to drag & drop items between 2 listboxes? Thanks!
1
by: Darren | last post by:
I'm trying to create a file using drag and drop. I want to be able to select a listview item drag it to the shell and create a file. Each icon in the listview represents a blob in a database. When...
15
by: uwcssa | last post by:
I try to drop a table as: I got: During SQL processing it returned: SQL0478N The object type "TABLE" cannot be dropped because there is an object "sch.SQL070515104729271", of type "FUNCTION",...
1
by: Thi | last post by:
Hi, I am trying to develop an application that allows the users to drag a few file(s) from a zip archive to a destination. My question is, how do i determine where the drop destination is...
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.