473,804 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Values to change in suckerfish menu

The style sheet shown below is from the suckerfish vertical menu.
http://www.htmldog.com/articles/suck.../vertical.html

I've added in a few minor changes to color code the levels.
I changed the width of the first level to 8em and get an unwanted space
between that and the 2nd level.
I'd like their to be no gap between the levels when I change the widths.
What's to change to do this?

Also, I do not understand the reason for "left: - 999em" in one definition.
However, changing the value came up with some interesting results.
<style type="text/css">

body {
font-family: arial, helvetica, serif;
}

#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
float : left;
width : 11em;

}

#nav li { /* all list items */
position : relative;
float : left;
line-height : 1.25em;
margin-bottom : -1px;
width: 11em;

}

#nav li ul { /* second-level lists */
position : absolute;
left: -999em;
margin-left : 11.05em;
margin-top : -1.35em;
}

#nav li ul ul { /* third-and-above-level lists */
left: -999em;
}

#nav li a {
width: 8em;
display : block;
color : black;
font-weight : bold;
text-decoration : none;
background-color : #FAA;
border : 1px solid black;
padding : 0 0.5em;
}
#nav li li a {
width: 8em;
w\idth : 10em;
display : block;
color : black;
font-weight : bold;
text-decoration : none;
background-color : #0F0;
border : 1px solid black;
padding : 0 0.5em;
}

#nav li li li a {
width: 11em;
w\idth : 10em;
display : block;
color : black;
font-weight : bold;
text-decoration : none;
background-color : #DDF;
border : 1px solid black;
padding : 0 0.5em;
}
#nav li a:hover {
color : white;
background-color : black;
}

#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav
li.sfhover ul ul ul {
left: -999em;
}

#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav
li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists
nested under hovered list items */
left: auto;
}

#content {
margin-left : 12em;
}
</style>
Jul 21 '05
10 6017
"Richard" <An*******@127. 001> wrote:
On Thu, 03 Mar 2005 17:17:58 -0600 kchayka wrote:

A much better approach, IMNSHO, is to put just the top-level menu links
in the HTML, which go to section index pages that contain the submenu
links. Use JavaScript to *add in* the submenus rather than just hide
them. That way, those who are able to use the DHTML menus as intended
get the "benefit" and the rest of us aren't punished for it.
Does this mean you'd prefer to rewrite a 50kb page just to add in one link?


No. He means that a new page with new content should be loaded when
the top level links are clicked on. (In some of these menus systems
top level itens are merely hooks for the DHTML and aren't actually
links). The content of this new page should contain all the links that
are children of the top level item in the DHTML menu.
That caters for users without JS.

And if such a page is 50kb then you're doing something wrong. CSS and
site furniture images should be cached. So unless you're adding new
images to the section page it really shouldn't be 50kb. 50kb is a lot
of HTML - http://www.sfsfw.net/a/author.php is less than 50kb.
I'm on dialup and I had to wait 3 minutes for your page to load.
You want me to do it all over again for one link? Bye bye.


You, and most other users, have the option of enabling JavaScript and
using the DHTML menu. This is a fallback for those users who can not
or who choose not to enable JavaScript.

On the file size issue:

suckerfish - HTML for all levels of menu is in every page so everyone
gets a bigger download.

kchayka - HTML for top level of menu is in every page. Rest of menus
are in JS file and only downloaded once.

So users with JS enabled get a slightly bigger download on the first
page but a smaller download on all other pages.
Users without JS enabled get a smaller download on every page but
sometimes have to click through an intermediate page or two to reach
their target.

Neither option is automatically better or worse.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 21 '05 #11

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

Similar topics

3
14960
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
1
4687
by: Martial Spirit | last post by:
Hello- I was amazed at the suckerfish drop-downs from AListApart.com. They work great except for one thing, if I position the drop-downs over an iframe element, on mouseover the menus disappear. It works fine in IE, but not FireFox. I would like to implement these menus, but if I can't get this to work, I gotta look at something else. If anyone has some suggestions, I would appreciate it.
16
4458
by: michael | last post by:
Is it possible to get all href URLs contained in a unordered list and place them in an array? Or in fact two different arrays, differently named one for each <ul> group? <ul> <li><a href="lemurs.html">Lemurs</a></li> <li><a href="chameleons.html">Chameleons</a></li> </ul> <ul>
23
2824
by: timmy | last post by:
Anyone knows if the htmldog suckerfish menu can be done in a more fluid way: http://www.htmldog.com/articles/suckerfish/dropdowns/ Or more precisely, the 2-level menu: http://www.htmldog.com/articles/suckerfish/dropdowns/example/bones2.html In fluid I mean: 1) The width of each drop menu to equal the widest text of any item contained within the visible drop menu.
3
1712
by: j0nharris | last post by:
I'm using the suckerfish vertical menu, & the positioning is working like a charm in every browser except IE6 -- go figure! The menu is sitting on its own page for now on http://www.radford.edu/jcharris/nav2.html Thanks for any input. -jon
5
3974
by: z | last post by:
I'm using a horizontal CSS-based dropdown menu based on this code: http://www.weblens.org/templates/sample_menu.html Is there a relatively easy way to add a slight delay to the menu with JavaScript, so that when you take the mouse off the sub-menus don't disappear right away?
1
1847
by: boien | last post by:
I have 4 buttons from images i created via Photoshop, now i want to get a drop down kind of popout menu when you go to them just like the ones in http://geeksontime.com/ on the left hand column, rollover "who we are" and youll see the menu and waht im talking about. My first question is. whats teh best way to go about creating the dropdown/popout menu with links, im told suckerfish menu is the best way so far but im open to any suggestions,...
1
2225
by: =?iso-8859-1?q?Jean-S=E9bastien?= | last post by:
i'm using suckerfish dropdowns, for my menus. it looks nice. but i have a problem: when i get a div with overflow: hidden property after it, the menu is overdrawed by this div.
1
2733
by: phpmagesh | last post by:
Can any one guide me how to create sucker fish menu step by step. i seen in Son of Suckerfish Dropdowns | HTML Dog but i cant able to do where to start and where to write which code. can any one help me to succeed in this task please, regards, magesh
0
9595
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10354
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10359
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9177
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.