[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 11-27-2004, 12:57 PM   #1 (permalink)
First Time Poster!
 
Join Date: Nov 2004
Posts: 1
2.00 NP$ (Donate)

matej.barac is an unknown quantity at this point


Drop down menu

Hi,

I am trying to make a drop down menu using only CSS. I want to be able to set the width of the menu and don't want the width to be dependant of size of the menu option (width of the phrase). Also, is it possible to control the height of the menu?

This is the XHTML code (I am using 1.0 strict):

<div class="option">
<form name="navigation">
<select name="selectname" SIZE="1">
<option class="">not wide enough</option>
<option class=""></option>
<option class=""></option>
<option class=""></option>
</select>
</form>
</div>


And the CSS part:


div.option
{
position: absolute;
top: 10px;
left: 0px;
width: 520px;
height: 50px;
z-index: 3;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 10px;
}

I am trying to avoid Javascript, but if this is not possible with CSS can someone tell how to do it with Javascript?
matej.barac is offline  
Old 11-27-2004, 02:00 PM   #2 (permalink)
NamePros Regular
 
CreativeLogic's Avatar
 
Join Date: Sep 2003
Posts: 894
138.00 NP$ (Donate)

CreativeLogic has a spectacular aura aboutCreativeLogic has a spectacular aura about


You're going to have to use some style on the actual select tag for the height and width.
__________________
Online Time Tracking :)
CreativeLogic is offline  
Old 11-27-2004, 02:07 PM   #3 (permalink)
Account Closed
 
tony84's Avatar
 
Join Date: Oct 2004
Location: Manchester, UK
Posts: 624
46.35 NP$ (Donate)

tony84 is on a distinguished road


im not sure about css
but as for the javascript:

HTML Code:
<form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option value="http://oooo">oooo</option>
<option value="http://iiii">iiii</option>
<option value="http://mmmm">mmmm</option>
</select>
</form> 
tony84 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 04:10 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85