Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Seting size of listbox

    I have created a list box in HTML. I am able to set it's height using the property "size" but i want to set it's width. how can i?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inline

    AFAIK, form controls are inline elements and their width can therefore not be set; it is determined by the element's content. However, floating would implicitly make them block level which should allow a width to be set.

    Is there a reason why you want to specify a width different from that set by the content?
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ronaldb66 View Post
    AFAIK, form controls are inline elements and their width can therefore not be set; it is determined by the element's content. However, floating would implicitly make them block level which should allow a width to be set.

    Is there a reason why you want to specify a width different from that set by the content?
    first of all tell me what does AFAIK means ... secondly, i want to set the width to make the page look good.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Abbrevs

    Oh, sorry, blast from the past: As Far As I Know.

    This article on HTML Dog may be of help: Laying Out Forms.
    Again, floating them (or maybe just setting them explicitly to display: block) should enable you to give form controls a specific width.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ronaldb66 View Post
    Oh, sorry, blast from the past: As Far As I Know.

    This article on HTML Dog may be of help: Laying Out Forms.
    Again, floating them (or maybe just setting them explicitly to display: block) should enable you to give form controls a specific width.
    mm, thanks man!. i'll read it out

    btw, i got this too

    Code:
    <select id="someId" name="someName" style="width:200px">
        <option>1</option>
        <option>2</option>
        <option>3</option>
        <option>4</option>
    </select>
    Last edited by hYph3n; 02-08-2007 at 07:56 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •