rawb Posted April 4, 2008 Share Posted April 4, 2008 My problem is that three input boxes on my form, each of which have { width: 33% }, are displayed on different lines.. up to 666px (scarily enough). When the width is 667px, all three fit on the same line (which is what I want, but at any width).. The file is here (simplified, obviously): http://rawbwk.com/test.html The CSS: * { padding: 0; border: 0; margin: 0; } #container { width: 666px; margin: auto; border: 1px solid black; } #t1 { width: 100%; } .t2 { width: 100%; } .t2 input { width: 33%; background-color: red; } The HTML: <div id="container"> <div id="t1">Test <div class="t2"> <input name="test1"></input> <input name="test2"></input> <input name="test3"></input> </div> </div> </div> Thanks in advance... Link to comment https://forums.phpfreaks.com/topic/99476-form-problem/ Share on other sites More sharing options...
AndyB Posted April 4, 2008 Share Posted April 4, 2008 Partly, it's a white space issue. Put all the inputs on the same code line and they all appear in a single 'row'. Fails: <input name="test1"/> <input name="test2"/> <input name="test3"/> Works: <input name="test1"/><input name="test2"/><input name="test3"/> Link to comment https://forums.phpfreaks.com/topic/99476-form-problem/#findComment-508973 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.