NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Drop down menu

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 11-27-2004, 01:57 PM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Nov 2004
Posts: 1
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;
????: NamePros.com http://www.namepros.com/programming/57315-drop-down-menu.html
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, 03:00 PM   #2 (permalink)
NamePros Regular
 
CreativeLogic's Avatar
Join Date: Sep 2003
Posts: 890
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, 03:07 PM   #3 (permalink)
Account Closed
 
tony84's Avatar
Join Date: Oct 2004
Location: Manchester, UK
Posts: 624
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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:25 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger