I am writing some in php that needs some forms and everything done in CSS. I have a form with two 'SELECT' and two 'INPUT'...
The lines of code look like this :
FORM :
<div><form style="width:400px; border:2px dotted #999; margin:10px; padding:5px; " name="" method="" action="">
SELECT :
<div style=" margin:2px;"><select name="" style="width:100%" border:1px solid #000;"></div>
INPUT :
<div style=" margin:2px;"><input type="text" name="" style="width:100%" border:1px solid #000;"></div>
Now in IE and Mozilla, I am getting a 5 or so pixel shortness on my SELECTs! But it works fine in Opera :!:
Can some one please point me in the right direction...
Thank You
Form object widths...
I think your problem is that your 2 select and input divs are inside the form div, so you are already getting a 5px padding before you already start giving them a 2px margin
remove the padding or make it 2px and then remove the margins from select and input.
Regards
Day
Form object widths...
I have tried removing all styles...the same spacing problems accure!?!??!
I also tried taking off just the form styles and appling just the styles to the 'INPUT' and 'SELECT' and vise-versa...same thing...
Form object widths...
can you just increase their length by 5px's in hacks only for IE and Moz or decrease it in a hack for opera.
Otherwise not sure why.
Regards
Day
Form object widths...
I guess the thinking that I am doing over here is...I have seen it done correctly in multiple browsers...and isn't the whole idea of css is to get around not having to use hacks?
I just tried using the 'SPAN' tag instead of the 'DIV' tag...got the same results but accually ~10px longer than the 'DIV'!!!