Hi
I'm using a css form layout which i've adapted from here:
http://www.quirksmode.org/css/forms.html
The layout worked well in both Firefox and IE6 until I started using fieldsets. When the layout is inside a fieldset, it works as expected in IE while Firefox spreads the elements out on one line. I am wondering whether this is a Firefox bug.
Whether it is or not, does anyone know how i can get it to behave correctly in firefox?
Here is a demo of the problem
and here is the code i'm using:
CSS:
and XHTML:Code:li input, li textarea{ float: left; } li input.text, li textarea { display:block; width:150px; margin:0 0 10px 0; padding:1px 2px; border:1px solid #9bc365; background:#333; color:#fff; } li textarea{width:250px;height:150px;} input.submit{ border:2px outset #9bc365; background:#9bc365; margin:0 0 0 120px; } li label{ display:block; float:left; text-align:right; width: 100px; margin:0 20px 0 0; } form li{ clear:both; list-style:none; }
by the way, i'm using Firefox 1.5.0.5HTML Code:<form> <fieldset> <legend>Login</legend> <ul> <li><label>Username</label><input class="text" type="text" /></li> <li><label>Password</label><input class="text" type="password" /></li> <li><input class="submit" type="submit" value="Go!" /></li> <li></li> </ul> </fieldset> </form>
thanks for your help



Reply With Quote

Bookmarks