HTML - How To Limit The Drop Down Length In <select>?
hi
My code is- <HTML> <HEAD></HEAD> <BODY> <TABLE> <TR><TD> <SELECT NAME="Date"> <OPTION>1</OPTION> <OPTION>2</OPTION> : : <OPTION>30</OPTION> <OPTION>31</OPTION> </TD></TR> </TABLE> </BODY> </HTML> it will show the numbers from 1 to 31 in the drop down with long scrollbar. My problem is - I want show only 10 numbers.User need to scroll and select other numbers. Is it possible? Similar TutorialsIs there any way to limit the selection form a multiple select box to a certain number. <select multiple="multiple" size="5"> <option>Beer</option> <option>Vodka</option> <option>Guinness</option> <option>Sambuca</option> </select> How can I stop people selecting more than 2 options? Cheers in advance for the help. Hi there, I am currently building a website in dreamweaver. It's going slow but so far I have overcome ever problem with the help of people like you! The problem I'm at at the moment is pretty tricky. If you visit. http://aquariusspa.co.uk/flw%5Fver2/flw_ver2.html This site I built with photoshop and then exported as html. Now i'm adding content and the nav bar (which isn't quite working right!). So what i'm looking to do is have the main box (one with welcome in it) change height depending on what i enter in to it. Every page has different amount of text. Now I could just build every page in photoshop for the desired page height but surely there must be a way of stretching what i've got with out wreaking the graphics. Thanks in advance. S How can I drop down a select list with onmouseover instead of clicking it. Select list cannot be clicked in javascript to emulate that. eg: onmouseover="(this.click())" Also setting the 'size of select list' = 'its length' in javascript does not accurately emulate the click event because the adjacent layout changes. I tried using z-index and position attribute but doesn't help. I want to sell some stuff over the internet like cloths.... And I use Pagseguro (Its a brazilain thing, like paypal). So, I have this wordpress site, with pagseguro plugin installed on it. To add products on my posts I use the following code to get the Add to cart button. HTML Code: <object><form method="post" action="" style="display:inline"> <input type="submit" value="Adicionar ao Carrinho" /> <input type="hidden" name="product" value="[b]PRODUCTNAME[/b]" /><input type="hidden" name="price" value="PRODUCTPRICE" /><input type="hidden" name="addcart" value="1" /><input type="hidden" name="cartLink" value="<?php the_permalink() ?>" /> </form></object> The thing is, the plugin is really simple. All it does is: show "add to cart" button and the "pay" button. And like I said, I want to sell cloths. To sell cloths there got to be the Sizes: "S""M""L" and color. And what I wanted to do is: Create a form like this: HTML Code: <form name="jump"> <p align="center"> <select name="menu"> <option value="URL">Text that will appear in the choices</option> <option value="URL">Text that will appear in the choices</option> <option value="URL">Text that will appear in the choices</option> </select> <input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO"> </p> </form> (I found that on http://personal-computer-tutor.com/dropdownlist.htm) On the options there would be the sizes for my clients to choose. And on the "ADD TO CART CODE" (the first code on the top) on the "PRODUCTNAME" part would be a PHP or something that would gather the clients choice and add it there. So when he press the button the product he chose would show on the cart with the size in parentesis. Like this: HTML Code: <object><form method="post" action="" style="display:inline"> <input type="submit" value="Adicionar ao Carrinho" /> <input type="hidden" name="product" value="Alpinestars (<?php GET FORM VALUE ?>)" /><input type="hidden" name="price" value="PRODUCTPRICE" /><input type="hidden" name="addcart" value="1" /><input type="hidden" name="cartLink" value="<?php the_permalink() ?>" /> </form></object> (for the button) and if he chooses small it be like this on the shopping cart: Alpinestars (Small) I know its really difficult to understand My english is really bad. But im really sad because I cant do this by any way. Could yall please help me with my problem? Thank You. Hi All, I've been asked to make some hyperlinks that automatically select items in a drop down menu in a contact form. Is this possible if so, how is it done Thanks in advance Bluestreak I've made an incredibly simple html page as an active desktop for a gpo policy, however there's been an uproar about colours so I thought I'd give it a stab to have a drop-down box to select from a range of colours for the body style tag. Any suggestions? <html> <head> <!--808080--> <title>ArchitenBG</title> <STYLE type="text/css"> body { background-color:#3A6EA5; } #div1 { position: absolute; size: 50%; bottom: 0px; right: 0px;} </STYLE> </head> <body> <div id="div1"><img src="Talbg.png" /></div> </body> </html> Hi. I have a very discrete light blue color in the background from a previous template. It ends about halfway through the bottom area and I'd like to extend it throughout the entire page without moving/overwriting anything else please. www.movehumanityforward.com Thank you I have a menu made up of one div and within that div are more divs to make up the separate menu items. I am trying to add a background colour to the holding div but it's not having any effect. When I investigate the div order in web developer it shows that it's not extending to the height of the menu divs inside it. Please help. It's menu_nav I am trying to put a background on. HTML: HTML Code: <div id="menu_nav"> <div class="mainMenu"> <a href="#">HOME</a> </div> <div class="mainMenu"> <a href="services.html" onmouseover="mopen('servicesSub')" onmouseout="mclosetime()">SERVICES</a> <span id="servicesSub" onmouseover="mcancelclosetime()" onmouseout="mclosetime()"> <a href="#">Website Production</a> <a href="#">Hosting & Domains</a> <a href="services.html#design">Design & Branding</a> <a href="video.html">Video Production</a> <a href="#">Interactive Media</a> </span> </div> <div class="mainMenu"> <a href="portfolio.html" onmouseover="mopen('portSub')" onmouseout="mclosetime()">PORTFOLIO</a> <span id="portSub" onmouseover="mcancelclosetime()" onmouseout="mclosetime()"> <a href="portfolio.html#websites">Websites</a> <a href="portfolio.html#programs">Programs</a> <a href="#">Video</a> <a href="#">Animation</a> <a href="#">Design</a> <a href="#">Web solutions</a> </span> </div> <div class="mainMenu"> <a href="info.html" onmouseover="mopen('aboutSub')" onmouseout="mclosetime()">INFO</a> <span id="aboutSub" onmouseover="mcancelclosetime()" onmouseout="mclosetime()"> <a href="prices.html">Prices</a> <a href="sitemap.html">Sitemap</a> <a href="aboutUs.html">About Us</a> <a href="contact.html">Contact</a> </span> </div> </div> CSS: Code: * MAIN MENU NAVIGATION*/ #menu_nav a, #servicesSubMenu a { text-decoration:none; color:black; } #menu_nav { width:950px; background-color:#E6E6E6; height:auto; margin-top:0px; font-size:11pt; margin:auto; } .mainMenu { float:left; float: left; margin: 0px 75px 0px 75px; background-color:#E6E6E6; line-height:30px; } .mainMenu a { line-height:20px; display: block; font-size:11pt; text-align: left; text-decoration: none; background-color:#E6E6E6; } #menu_nav a:hover, #footer a:hover, #left_menu_column a:hover { color:RGB(5,127,204); } /*DROPDOWN MENU*/ #servicesSub, #portSub, #aboutSub { visibility:hidden; position:absolute } #servicesSub a, #portSub a, #aboutSub a { width:150px; border-bottom:1px solid white; color:grey; padding-left:4px; padding-right:4px; padding:5px; } hello, new member here so hiya! I have a site and I have a div containing all the page. At first I gave it a height just so I could put CSS in and see what it's like. After I have taken out the height though, the div shrinks to like 1 pixel. Why isn't it as long as it's containing divs - including left column, main section, footer? Many thanks hi, I have this:<form > <input id="Email" maxlength="40" name="Email" size="40" type="text" value=""><br /> <input id="pwd" maxlength="40" name="pwd" size="40" type="password" value=""> <label for="Submit"> </label> <input id="Submit" name="Submit" type="submit" value="Submit"> </form> In Safari and Firefox, the two boxes look the same length, you can see from diff_ff.jpg, but in IE, it looks different(please see diff.jpg), if I change "password" to "text" they will look the same in length, any solution to this? Thanks, A.C. Hi All, Is there any maximum length for tooltip for html tags? How can I determine the possible max length? Rahul.... Please take a look at this page: http://lifeengineering.org/ Try out the menu links and see what I'm talking about. The "short" pages shift horizontally. In other words, if the div block with the content doesn't reach the bottom of the browser window, then it's rendered in a different horizontal position. So, changing the pages through the menu makes the pages appear to "jump". NOTE: You'll need a reasonably big resolution to see what I'm talking about (e.g. 1152 x 864+). Any suggestions on how to correct this? Is there a way to pad blank spaces at the end of my content in the div block to ensure that it always reaches the end of the browser window? Or something similar? ------ Issue #2: My background isn't ideal. I like the rainbow, but I'd like to change it. If I wanted to make the rainbow arc appear stationary as I scroll the page (i.e. to have the upper left arc of the rainbow always appear on the upper left corn of the screen), how would I do it? Any other suggestions, artistically, with respect to the page background? Thank you kindly! This is one of these things where you probably should just go to bed and forget all the confusion. My question: How the heck can you specify the length of the option field for a drop town list? I am sure ther is an embarrasingly simple answer. Thanks a lot and good night! Hi, I'm writing a website using tables (0 border and space etc.) so that things don't move around on different computers and browsers. However, I've run into a bit of trouble with a particular cell. The one in questions is my navigation menu. I have it written in php as a separate page and used the include tag to load it onto the index. It consists of a table of height 600 and a single column with a couple of cells. Now, from my reasoning, the the 600 table height of the nagivation menu/page should easily fit into the 600 cell height of it's space on the index. This is reflected when I view the page using IE - all of the border/frame images that I had made went together perfectly. However, when I view the page with FireFox, the navigation menu seems to be too short in that the first navigation cell does not immediately appear after the top border line. There is a blank white space. Also, it seems to have stretched that particular row because the right most border on the index, which is not connected to anything else and is it's own image, is centerized so that there is white space left (indicating the cell was incremented height wise). Does anyone know if this is a fixable discrepancy? A link to the test page is: VA Test Page I can provide a link to the menu page if it's needed... Anxiously awaiting a reply whether it's related or not How do I figure out the lenght of the page (content, not browser window) so that I can make all of my regions line up at the bottom? I noticed that % in the height attribute is related to the window not content. I have also tried auto, but that is different for different content. My page has an outside region, a left nav bar and a content region, and I don't know how to make the bottom line up without tables. Sorry if this is confusing. Thanks in advance. Ok I know this isn't really a HTML issue, but to avoid complex clientside pixel-counting of fonts I've thought of something far more simple. I need to limit the length of a string to stop it wrapping. The first step is to limit the string's length in characters, using the following php script: PHP Code: function trim_string($string) { $trim_string = '...'; $chars = 55; $chars_adjusted = $chars - strlen($trim_string); if (strlen($string) > $chars) { $string = substr($string,0,$chars_adjusted); $string .= $trim_string; } return $string; } Fine, no problem. Now however the strings are not all of equal length because of differences in length of each character (see the warmdebate.com homepage for my debacle). I thought that a relatively simple solution would be to simple use some sort of CSS or HTML wizardry to stretch the trimmed string to a fixed length (like full alignment, only for a non-wrapped string). Since this doesn't involve pixel counting or anything like that I figure it should be doable in CSS or HTML. Also, if there are any standard solutions to this other than what I'm proposing please let me know! The adage of 'give a man a fish and he'll be fed; give a man Dreamweaver and he thinks he's a designer' is alive and well with these glitches. http://www.zenarchy.co.uk/test11.htm is a design draft and there are two problems. The first is that the central span that houses 'High quality call recording software' doesn't match up to the end and sit flush. It's almost there in firefox but is miles off in IE. I'd like it to work in both. <td width="100%" height="22" bgcolor="#91a2a0"> <p align="center"><b><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>High quality call recording software</strong></font></b></td> is the code I've identified as relevant, but opening the hood and checking the source might be wiser! 2. How do I extend the columns on either side to sit flush at the bottom against the graphite baseline? Your thoughts please (aside from get a pro to do it...) Cheers! I have a left menu column but it's not stretching down the length of the page. The page is quite long and when the links are finished on left column it just ends and as it has abackground colour it looks a little strange. It is floated left and the main_section is also floated left. It is the main section div that is long. I was thinking because this is in a div that the left coumn is also in that the left column would therefore stretch to the length of it's parent div. Any ideas? http://absolute-websites.com/services.html is the link so you can see what I'm talking about. Here is a section of the HTML : HTML Code: <div class="left_column"> <div class="breadcrumb"><p><a href="index.html">home ></a>services</p></div> <div class="icons"><p><a href="services.html#websiteProduction"><img src="images/webIcon-01.png" title="web building" alt="web building icon"/></a></p></div> <div class="icons"><p><a href="services.html#hosting"><img src="images/hostingImgIcon-01.png" title="Hosting & Domain Names" alt="Hosting & Domain Names icon"/></a></p></div> <div class="icons"> <p><a href="services.html#seo" ><img src="images/seo2Icon-01.png" title="Search Engine Optimisation" alt="Search Engine Optimisation icon"/></a></p></div> <div class="icons"> <p ><a href="services.html#marketing"><img src="images/advertsIcon-01.png" title="Marketing" alt="marketing icon"/></a></p></div> <div class="icons"><p ><a href="services.html#design" ><img src="images/designImgIcon-01.png" title="Design" alt="Design icon"/></a></p></div> <div class="icons"> <p ><a href="services.html#photo" ><img src="images/photoIcon-01.png" title="Photoditing" alt="Photoediting icon"/></a></p></div> <div class="icons"> <p><a href="services.html#video" ><img src="images/videoIcon-01.png" title="Video Production" alt="Video Production icon"/></a></p></div> </div> <div id="main_content" class="fl"> <h1 class="h1SecHead" >>SERVICES</h1> If you want to download a variable length text file, what would be the correct http headers to use? I am trying to make a page that has a DTML (dynamic expanding links), and a right hand column - Below is my code. I want to make the right hand colunm (most common questions grey area) a fixed height. It seems to be the length of the page as if all the menus are clicked on and opened even if they are closed. How can I make it a fixed height regardless of how many links (dhtml) are opned or not so that most common questions are no longer than say 500 pixles. Any suggestions would be handy. I can send code / page as its to long to paste here! Thanks, Ryan |