473,396 Members | 1,722 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 Problem

Hi I am using a drop down menu adapted from the one in Stylin with CSS
by Charles Wyke Smith.

The CSS is below.

It works perfectly in Internet Explorer (using the csshover behaviour
file) but in Firefox (and presumably other standards compliant
browsers) it indents the menu on the screen then indents the drop down
box by (seemingly) the same amount. So, there is a gap between the edge
of the screen and the first item in the menu and then the drop down
items are not lined up with their parent main menu item.

If you want to have a look - please visit my website
http://www.my-rss.co.uk/ but you will need to create a temporary
account and then an rss feed to see the menu - which might be too much
bother. Hope the snippet below is enough info.

Can anyone help? It is driving me to distraction.
The menu itself is a hierarchical (to two levels) unordered list in a
div with an id of menuitems.
Thanks.
-------------------------------------------------------------------------------------------
#menuitems
{

width:100%;
padding:0px;
margin:0px;
text-align:left;
float:left;
border-bottom: 1px solid #F6A77C;
font-size:11px;
background-color: #ffdeb7;
z-index:100;
}

div#menuitems ul {
margin:0 0 0 0px;
}

div#menuitems li {
z-index:50;
float:left;
position:relative;
list-style-type:none;
background-color:#ffdeb7;
border-left:1px solid #F6A77C;
padding:3px;
}

div#menuitems li:first-child {
border-left:1px solid #F6A77C;
}

div#menuitems li:hover {
background-color:#ffffff;
}

div#menuitems a {
display: block;
padding: 0px 6px;
text-decoration:none;
color:#000000;
}

div#menuitems a:hover
{
color:#ff0000;
}

div#menuitems ul li ul {
margin:0;
position:absolute;
width:20em;
left:-1px;
top:20px;
}

div#menuitems ul li ul li {
width:100%;
border-left:1px solid #F6A77C;
border-bottom:1px solid #F6A77C;
border-right:1px solid #F6A77C;
padding:3px;
}

div#menuitems ul li ul li:first-child {
border-top:1px solid #F6A77C;
}

div#menuitems ul li ul {display:none;}
div#menuitems ul li:hover ul {display:block; }

Apr 9 '06 #1
1 1709
Managed to solve the problem by putting

* {margin:0; padding:0;}

at the top of the stylesheet.

Apr 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: KK | last post by:
Drop-down menus are the hottest thing since Wonder Bread but . . . 1. Alot of people put them in the they-look-nice-but-you-cant-code-them-right-so-they-always-look-messed-up category (a la...
6
by: Greg Scharlemann | last post by:
I am attempting to populate a drop down menu based on the selection of a different drop down menu. However, it is not working correctly, I cannot figure out for the life of me what exactly happens...
0
by: vikram.cvk | last post by:
Hello Experts, Im trying to design a CSS vertical drop down menu which should have the following functionality. Home About Us | -->Overview
4
by: rajat | last post by:
Hi, I have adapted a drop down menu from USC webpage (www.usc.edu). The link to my page is http://www-scf.usc.edu/~swarup/test/test.html The links to the CSS ans JS files are:...
2
by: hemanth.singamsetty | last post by:
Hello there, I've a drop down menu (created using CSS & Javascript -- see code below). My problem is, whenever I click a link on the menu the new page replaces the current page (and the menu...
4
by: simon.cigoj | last post by:
I have an javascript made menu and some forms with the dropdown element. When the menu opens and scrolls down the drop down is displeyed over the menu and obscures the menu choices. I have this...
3
by: rsteph | last post by:
I have a javascript drop down menu that I borrowed from a website. It utilizes a little .css to help with formatting. The menu works great, and on all 3 of the browsers I'm concerned about; but I am...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
22
by: Archanak | last post by:
Hi, I am using 2-level CSS Drop Down Menu in my perl/CGI program. here is the code. #!c:/perl/bin/perl.exe use CGI qw(:standard);
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.