Ghettobusta Posted April 17, 2007 Share Posted April 17, 2007 Let's say I display a certain sentence in a drop-down menu: print '<option value="'.$enregistrement['Unom'].'">'.$enregistrement['Unom'].'</option>'; If I want to create an input that will be the same size as my drop-down... how can I do this? <input type="password" maxlength="12" name="password" size="30"/> What do I put in size instead of "30"? If you don't understand my question... this might help you visualize it: http://cogito.labos.polymtl.ca/~ti317/TS2/intervention.php I want the "Mot de passe" and "Commentaire" inputs to be as long as "Sujet" thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/47373-quick-question/ Share on other sites More sharing options...
ToonMariner Posted April 17, 2007 Share Posted April 17, 2007 you could style both the text input and select input to have width: 100% of container element. Quote Link to comment https://forums.phpfreaks.com/topic/47373-quick-question/#findComment-231132 Share on other sites More sharing options...
soycharliente Posted April 17, 2007 Share Posted April 17, 2007 You can't give an input form a width of 100%. That won't do anything. There is no width attribute of an input form. Quote Link to comment https://forums.phpfreaks.com/topic/47373-quick-question/#findComment-231295 Share on other sites More sharing options...
Daniel0 Posted April 17, 2007 Share Posted April 17, 2007 You can't give an input form a width of 100%. That won't do anything. There is no width attribute of an input form. Yes you can: <input type='text' style='width: 100%;' /> Note that ToonMariner said style. That means to use either a stylesheet or the style attribute. Quote Link to comment https://forums.phpfreaks.com/topic/47373-quick-question/#findComment-231410 Share on other sites More sharing options...
ToonMariner Posted April 17, 2007 Share Posted April 17, 2007 LOL Cheers Dan! Don't be dis-heartened Charlie - there are a billion and 1 things to learn in web development. Stick around and you'll get some pretty good tips - especially from me Quote Link to comment https://forums.phpfreaks.com/topic/47373-quick-question/#findComment-231538 Share on other sites More sharing options...
soycharliente Posted April 17, 2007 Share Posted April 17, 2007 LOL Cheers Dan! Don't be dis-heartened Charlie - there are a billion and 1 things to learn in web development. Stick around and you'll get some pretty good tips - especially from me No comment. Quote Link to comment https://forums.phpfreaks.com/topic/47373-quick-question/#findComment-231654 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.