473,388 Members | 1,340 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,388 software developers and data experts.

Ordered List/ UnOrdered List -> Transform them into drop down menus

Hi,

Is it possible to transform Ordered/Unordered list into navigation dropdown
menus?

Is this effect achieved by CSS? or via Javascript?

PLease advise

Thanks.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Dec 8 '06 #1
3 3465
Hi "User" <user@email>,

User wrote:
>
Is it possible to transform Ordered/Unordered list into navigation dropdown
menus?
Very possible
Is this effect achieved by CSS? or via Javascript?
One or both.

See some of the books by Eric Meyer for css versions and the necessary
Internet Explorer workarounds. Search the css-discuss email list
archives for more info.

See Stuart Langridge sitepoint book for a general idea of how this
might be done with JavaScript with more options than a pure CSS
dropdown menu can have. Or even
http://alistapart.com/articles/dropdowns/ but don't assume either of
these versions to be perfect unless you know the code is good.

Peter

Dec 8 '06 #2
ASM
User a écrit :
Is it possible to transform Ordered/Unordered list into navigation dropdown
menus?
A dropdown menu or tag select is used with form to send a variable (name
of select) with choice made (option selected)

How do you expect to get this feature with an ordered/unordered list ?

Probably using css you'll can give appearence of dropdown list to
another kind of list but certainly not selector html behavior.
Is this effect achieved by CSS? or via Javascript?
JavaScript with DOM

<script type="text/javascript">

function changeList(listId, selectorName) {
var L2 = document.createElement('SELECT');
L2.name = selectorName;
var L1 = document.getElementById(listId);
var L1o = L1.getElementsByTagName('LI');
for(var i=0; i<L1o.length; i++) {
var o = document.createElement('OPTION');
o.text = o.value = L1o[i].innerHTML;
L2.appendChild(o);
}
document.body.replaceChild(L2, L1);
}
</script>

<ul id="list1">
<li>menu 1</li>
<li>menu 2</li>
<li>menu 3</li>
<li>menu 4</li>
</ul>

<button onclick="changeList('list1', 'choice')">change lists</button>
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Dec 8 '06 #3
User wrote:
Is it possible to transform Ordered/Unordered list into navigation dropdown
menus?
Is this effect achieved by CSS? or via Javascript?
You can do a lot with CSS. Have you looked at this site:

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

Can you do what you want with any of the lists there?

If not do you have an example of a menu you want to replicate (url)?

Mike
Dec 12 '06 #4

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

Similar topics

6
by: Stanimir Stamenkov | last post by:
So if the 'type' attribute of the OL element is deprecated and authors should rely only on stylesheets how one could use a reference (as clear text) in the content to a particular list element? ...
3
by: David Ross | last post by:
I sometimes place a sidebar on a Web page, using the following: ..sideright { float: right; background-color: #fff; width: 40%; font-size: 90%; text-align: justify; margin-left: 1em;...
6
by: Stephen Miller | last post by:
Hi, How can I configure an ordered list so that the bullet is placed on the right hand side of the list item. ie: list item 1 * list item 2 * list item 3 * Thanks,
33
by: Jim Cobban | last post by:
I cannot get Netscape 4.79 to properly display the ordered list in the following fragment. <P>Get a specific portion of the date. Depending upon the value of index: <ol start=0> <li>complete...
1
by: yann | last post by:
Hi, I try to write a schema to validate this : <F> <L/> <A/> <B/> <C/> </F>
210
by: Christoph Zwerschke | last post by:
This is probably a FAQ, but I dare to ask it nevertheless since I haven't found a satisfying answer yet: Why isn't there an "ordered dictionary" class at least in the standard list? Time and again...
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
1
by: shapper | last post by:
Hello, I am creating 3 "elements" to display on a web site: a menu, a form and a pager to a table. In three cases I am using a list where each list item serves as a container of: - the menu...
2
by: asc4john | last post by:
When including an unordered list in an unordered list: Should it be included as a "list" item as in: <ul><liitem</ li><ul.... </ul<liitem</li</ul> or included in the LI element as in:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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...

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.