...

View Full Version : Setting Width To % ??????



bazjones
12-22-2004, 04:54 PM
Hi i have no experience in javascript but i am using a javascript menu in my website and was wondering whether it is possible to set the width of my javascript menu as a percentage such as 100%???

Code i have is below:

Thanks


var MENU_POS = [
{
//NAVIGATION BAR SETTINGS
// item sizes
'height': 15, //height of naviagtion bar
'width': 138, // Length of navigation bar
// menu block offset from the origin:
// for root level origin is upper left corner of the page
// for other levels origin is upper left corner of parent item
'block_top':60, //position from top of page
'block_left': 0, //position from left of page
// offsets between items of the same level
'top': 0,
'left': 140,
// time in milliseconds before menu is hidden after cursor has gone out
// of any items
'hide_delay': 600,
'expd_delay': 100,
'css' : {
'outer': ['m0l0oout', 'm0l0oover'],
'inner': ['m0l0iout', 'm0l0iover']
}
},
{
//DROP DOWN LIST SETTINGS
'height': 16,
'width': 250,
'block_top': 17,
'block_left': 0,
'top': 17,
'left': 0,
'css': {
'outer' : ['m0l1oout', 'm0l1oover'],
'inner' : ['m0l1iout', 'm0l1iover']
}
},
{
'block_top': 4,
'block_left': 240,
'css': {
'outer': ['m0l2oout', 'm0l2oover'],
'inner': ['m0l1iout', 'm0l2iover']
}
}
]

A1ien51
12-23-2004, 06:01 AM
try changing 'width': 138, to

'width': "100%",

brothercake
12-23-2004, 04:23 PM
Providing that the script will allow for that ... it depends on the rest of the script.

maxnix
12-23-2004, 09:38 PM
Try moving that setting into the stylesheet...

'css' : {
'outer': ['m0l0oout', 'm0l0oover'],
'inner': ['m0l0iout', 'm0l0iover'],
'width': '100%'
}

--
HTH,
Max



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum