...

View Full Version : Is there a way to format the space between form input boxes?



percept
01-12-2004, 05:53 PM
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.

oracleguy
01-12-2004, 06:05 PM
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.

me'
01-12-2004, 06:11 PM
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.

percept
01-12-2004, 06:47 PM
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!

Roy Sinclair
01-12-2004, 07:08 PM
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).

percept
01-12-2004, 07:31 PM
Cheers... white on light green, rollovers, etc... all changing... hired a new person for first try at it... but obviously doesn't do.

Oakendin
01-12-2004, 08:26 PM
You can try this:


<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.

me'
01-12-2004, 09:45 PM
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.

percept
01-12-2004, 11:17 PM
Thanks me' ... the last thing a rookie like me needs is non-predictable results...

Thanks for the effort Oakendin

percept
01-15-2004, 12:05 AM
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...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum