473,624 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Horizontal menu

This works in IE6. A horizontal menu made from a table with the space
created by a td class="gap". All tds are rendered as inline elements
except for .gap. So links are equidistantly spaced. This is to get
around the fact that IE5 doesn't recognise margin or padding-left etc.
It also has the virtue of easily transforming itself to a state
suitable for background images(tabs). That is remove the inline
display and give the tds suitable dimensions. As far as I know this is
the only way to do an automatic menu.

To get onto the question, does it work in IE5? There's a screenshot of
how it should appear. Many thanks.

http://www.sitetype.com/index.php?page=48
Jul 20 '05 #1
5 3125
pe*******@yahoo .com (Peter Cartwright) wrote:
This works in IE6. A horizontal menu made from a table
Why a table? A menu is a list of links, so a <ul> element would make
more sense.
with the space
created by a td class="gap". All tds are rendered as inline elements
except for .gap. So links are equidistantly spaced.
A problem that was only caused by your choice of a table...
This is to get
around the fact that IE5 doesn't recognise margin or padding-left etc.
Table cells don't have margins. But IE5 does recognise padding-left
for table cells. It was probably setting them to display: inline; that
caused the problems. IIRC, IE5 didn't like padding on any inline
element.
It also has the virtue of easily transforming itself to a state
suitable for background images(tabs). That is remove the inline
display and give the tds suitable dimensions. As far as I know this is
the only way to do an automatic menu.
What do you mean by "automatic" ?
To get onto the question, does it work in IE5? There's a screenshot of
how it should appear. Many thanks.

http://www.sitetype.com/index.php?page=48


It appears the same in IE 5.01 as in IE6.

However, in Opera 7.23 and Mozilla 1.5 (and I bet quite a few other
browsers as well) the three links appear as a vertical stack. Whoops.

Have a look at http://www.alistapart.com/articles/taminglists/ for
some ideas.

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 20 '05 #2
Steve Pugh wrote:

Have a look at http://www.alistapart.com/articles/taminglists/ for
some ideas.


Also check out Max Design:

http://css.maxdesign.com.au/index.htm

Tons of techniques to choose from.

Jul 20 '05 #3
Trent L <sp*******@hotm ail.com> wrote in message news:<g-*************** *****@comcast.c om>...
Steve Pugh wrote:

Have a look at http://www.alistapart.com/articles/taminglists/ for
some ideas.


Also check out Max Design:

http://css.maxdesign.com.au/index.htm

Tons of techniques to choose from.


Interesting stuff, trouble is it deepens the confusion. All the time
I've used CSS I haven't tried setting a width to inline elements.
Because the W3C reference says width only applies to block and
replaced elements. Now that I've tried it - I find I can. Can someone
explain the discrepancy?
Jul 20 '05 #4
pe*******@yahoo .com (Peter Cartwright) wrote:
Interesting stuff, trouble is it deepens the confusion. All the time
I've used CSS I haven't tried setting a width to inline elements.
Because the W3C reference says width only applies to block and
replaced elements. Now that I've tried it - I find I can. Can someone
explain the discrepancy?


Which browsers are using your width style? And are you triggering
standards or quirks mode via your doctype?

Internet Explorer in quirks mode will do lots of things that it
shouldn't and hence is not a good guide to whether your code is
working as it should.

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 20 '05 #5
Steve Pugh <st***@pugh.net > wrote in message news:<lk******* *************** **********@4ax. com>...
pe*******@yahoo .com (Peter Cartwright) wrote:
Interesting stuff, trouble is it deepens the confusion. All the time
I've used CSS I haven't tried setting a width to inline elements.
Because the W3C reference says width only applies to block and
replaced elements. Now that I've tried it - I find I can. Can someone
explain the discrepancy?


Which browsers are using your width style? And are you triggering
standards or quirks mode via your doctype?

Internet Explorer in quirks mode will do lots of things that it
shouldn't and hence is not a good guide to whether your code is
working as it should.

Steve


Yes that was it.

I had a closer look at the list menus but they won't work in this
case. That is a menu element that can either take the width of its
contents or have a fixed width - in other words a td. In any case the
list items aren't contained by the ul in Opera. And in IE there's an
unwanted margin-top (or whatever it is) on the li. See

http://website.lineone.net/~peterct07/list_version.htm
Using a table I think I've found a solution or several. I don't think
the padding-left or margin-left on anchors will work in IE5, which is
what I was referring to in an earlier post. But I've put up some
examples in case I'm wrong on that. Probably the inelegant example,
giving a float:left and width to a div sitting alongside the anchor,
is the best bet. I'd be surprised if it doesn't work, but can you tell
me what you find in IE5?

Incidentally Opera looks like it gets the first two examples wildly
wrong.

http://website.lineone.net/~peterct07/table_version.htm
Jul 20 '05 #6

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

Similar topics

13
5002
by: elad | last post by:
Hi The Menu doesn't work properly when I have 2 frame and the Menu popup frame=document target frame, when I choose item in the menu the doc opened and the menu get stuck. Here is the code I'm using: FrameSet ------------------------------------------------------- <html>
2
5312
by: Ansgar Hein | last post by:
I have been playing around with several different versions for a horizontal menu, but I haven't been able to build a horizontal navigation based on the vertical one featured on www.alistapart.com in the article "taming lists". However I have managed to build a horizontal navigation but it has a slight hitch in Mozilla and Opera, but it's fine in Internet Explorer. It is a strange occurrance of a 4 - 5 Pixel bar in grey (which is the...
15
9167
by: theo | last post by:
Hi, I'm working on a horizontal row menu, to use like folder tabs. Does anyone know what the CSS style "cursor" is supposed to produce? Any working samples? I put it in the code, but can't see anything resolve. http://www.w3schools.com/css/pr_class_cursor.asp It's probably staring right at me, but can someone tell me why hover isn't working in IE, but does in Mozilla? http://wholives.com/temp/tabs.htm me
5
4551
by: Chris Beall | last post by:
Objective: Using an HTML list, create a horizontal nav menu with these characteristics: - All menu items have the same width at all times. - When the window width is reduced, the menu items stack, rather than creating a horizontal scroll bar. - The menu cluster is always centered on the window. See http://pages.prodigy.net/chris_beall/Demo/centered%20horizontal%20list.html
2
9312
by: Sergio E. | last post by:
Hi group, I write this post with the following question: How can I to build an absolutely horizontal menu?, This is because I can't find how can I configure the menu component of asp.net 2.0 in vs2005. I need somthing like this: the root menu in this form
1
6611
by: camphor | last post by:
hi, I have a single column webpage with a horizontal dropdown menu and am trying to make the nav bar fit across the page, the column is 800px, it looks ok in dreamweaver 8 but when I test it in firefox, the nav bar which is a horizontal blue stripe with the links written inside it doesn't stretch the whole 800px, also how would you align the words in the submenu to the main menu, currently the submenus are centered html <body> <div...
5
5559
Haitashi
by: Haitashi | last post by:
Hello everyone: I have a CFMenu with the type set to horizontal. I'd like to have the sub-menu items open vertically. Is that possible? Here is my code. I want the Portals sub-menu (Portal A, Portal B, Portal C) to open vertically instead of horizontally. <cfmenu name="topMenu" type="horizontal" fontsize="14" fontcolor="##7A7251" font="'Lucida Sans', verdana, sans-serif;" selectedFontColor="##F58026" ...
19
3672
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the code for this from a tutorial but that menu was flush-left justified. Not what I want. Subsequent searches on google on how to center yielded a
0
8172
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
8620
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
8335
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
7158
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
6110
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
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
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...
1
2605
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
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.