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 10 of 10
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a way to format the space between form input boxes?

    I'm creating a site that has 6 form input boxes. Because each one is it's own form and not all in one form, I get quite a bit of vertical space between them in IE but not Mozilla. They are spread out and look ugly.

    Another issue making them ugly is that because a couple of them are lists, the width is dictated by the longest selection. Is there a way to set these lists at a specific width?


    Thanks for any suggestions.
    Last edited by percept; 01-13-2004 at 06:32 AM.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You want to make the list boxes a certain width? I believe that you can using CSS, I haven't tried it though.

    Just make a class and set the width to whatever you prefer and then make the drop downs part of the class.
    OracleGuy

  • #3
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    All that spacing are defined by the browsers' default style sheet. You can override this by specifying your own values. The offender here is likely to be margin, try setting margin: 0; on all your form elements and see where you can go from there.
    Last edited by me'; 01-12-2004 at 06:18 PM.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #4
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you kindly... I'm going to get out my CSS tutorials and get to work on this... just knowing that using CSS is the way to do it helps me with a starting point and then I can change the go buttons to images that should help out a bit.

    Cheers!

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yuck! White text on a light green background for your menu is bad enough but that mouseover effect makes the text almost illegible. Not what you asked about but I can see that as a problem (most especially for someone with Reg/Green color blindness, a significant fraction of the population).
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheers... white on light green, rollovers, etc... all changing... hired a new person for first try at it... but obviously doesn't do.

  • #7
    New Coder
    Join Date
    Jul 2002
    Location
    Los Angeles
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can try this:
    Code:
    <style type="text/css">
    	form { display: inline; }
    </style>
    This will remove the default link break of form at the start and end depending on where they are positioned. Like <h1> tags, etc.

    With the above CSS, it'll have all forms starting from whereever you put them. If you've coded for this break before, you'll get unpleasent formatting where ever you apply this.

  • #8
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Oakendin
    With the above CSS, it'll have all forms starting from whereever you put them. If you've coded for this break before, you'll get unpleasent formatting where ever you apply this.
    I don't see any advantage of setting the display to inline over manipulating the margins. Plus, disadvantages:
    • Somewhat unpredictable formatting when trying to draw what should be a block element as an inline element
    • Can't set explicit widths or heights, vertical margins or padding etc.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #9
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks me' ... the last thing a rookie like me needs is non-predictable results...

    Thanks for the effort Oakendin

  • #10
    New Coder
    Join Date
    Dec 2003
    Location
    Kelowna, British Columbia
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yup, just good old CSS gives me full control with the form inputs... margin is good, height, width... yeehaw! I was using the CSS in the input tags before... then I put in the form tags instead and voila!
    Thanks again...


  •  

    Posting Permissions

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