Anyone familiar with "Gurtcom" menus???

B

bobmct

Anyone:

As a non-js programmer (but incorporater of js code into my perl/php/html
sites) I am attempting to create vertical self expanding menu (when the
user cursors over a selection it will popup an additional set of selections
if there are any).

All my searching has brought me to a free version from www.gurtom.com,
especially their demo2 menu. By deciphering their code I've been able to
adjust the content, sizing, relative positioning within itself, colors,
actions, etc. But, one thing I CANNOT seem to overcome is the fact that it
is position is ABSOLUTE. As a result this does NOT function well within a
multi-box site design.

I was hoping someone was either familiar with this set of menu code
sufficiently enough to render it "relatively" positioned, OR be willing to
take a look at it (as a challenge) in an attempt to make it relatively
positioned.

Looking through the .js code I've found where it outputs "position:
absolute;" and changed that to "relative" but then the menu seems to fall
apart all over the screen.

If anyone is interested or willing, please take a look or respond and I
suppose I can even provide a sample of this code (along with the proper
heading disclosures, of course).

It seems to function quite well and very fast. But position is the BIG
issue.

Comments please?

Thanks,

bobmct
 
A

ASM

bobmct a écrit :
Anyone:

As a non-js programmer (but incorporater of js code into my perl/php/html
sites) I am attempting to create vertical self expanding menu (when the
user cursors over a selection it will popup an additional set of selections
if there are any).
But, one thing I CANNOT seem to overcome is the fact that it
is position is ABSOLUTE. As a result this does NOT function well within a
multi-box site design.

Most of the time popup menus are in absolute.
If not, you get an yoyo (jojo) effect with what follows your menu when
sub-menus expand.

If nothing after the menu, you can allways put it in a relative and
sized div.

Simple example without relative nor absolute :

<html>
<script type="text/javascript">
onload = function() {
var IE = false; /*@cc_on IE=true; @*/
if(IE) {
var m = document.getElementById('menu');
m = m.getElementsByTagName('LI');
for(var i=0; i<m.length; i++) {
if(m.getElementsByTagName('UL')) {
m.onmouseover=function(){this.className='ie';};
m.onmouseout=function(){this.className='';};
}
}
}
}
</script>
<style type="text/css">

/* *** roll-over via css *** */
#menu li ul { display: none; }
#menu li:hover ul,
#menu li.ie ul { display: block; }

/** some more css ***/
#menu { font-size: 16px; font-family: verdana, arial; }
#menu,
#menu ul,
#menu li { list-style: none; width: 150px;
margin: 0px; padding: 0px; }
#menu a { display:block; width: 100%; background: #eee;
text-decoration: none; padding-left: 5px; }
#menu a:hover { background: #ccc; padding-left: 10px; }
#menu li ul li a { background: #ffc; padding-left: 15px; }
#menu li ul li a:hover { background: #ff0; padding-left: 20px; }
</style>
<ul id="menu">
<li>
<a href="1.htm"> menu 1</a>
<ul>
<li><a href="11.htm">sub-menu 1.1</a></li>
<li><a href="12.htm">sub-menu 1.2</a></li>
<li><a href="12.htm">sub-menu 1.3</a></li>
</ul>
</li>
<li><a href="2.htm"> menu 2 </a></li>
<li>
<a href="3.htm"> menu 3</a>
<ul>
<li><a href="31.htm">sub-menu 3.1</a></li>
<li><a href="32.htm">sub-menu 3.2</a></li>
<li><a href="33.htm">sub-menu 3.3</a></li>
</ul>
</li>
</ul>
</html>

Something very interesting about dynamic menus in css :
http://www.cssplay.co.uk/menus/index.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top