TheFilmGod Posted May 21, 2009 Share Posted May 21, 2009 How does one align text with a checkbox? I'm very experienced with Css and I could float the checkbox/text and get it to align perfectly in FF. But then I check it in IE and it's all over the place. Do I need to use IE only css stylesheets, or is there a solid, proven way to align the two together (cross-browser)? Quote Link to comment https://forums.phpfreaks.com/topic/159023-align-text-with-checkbox/ Share on other sites More sharing options...
Hybride Posted May 21, 2009 Share Posted May 21, 2009 Would be great to see what your code is, but if this is for a form or something non-layout, why not just use a table? And there are ways to use the two together, but it's a bit ugly (ie: using !important) Quote Link to comment https://forums.phpfreaks.com/topic/159023-align-text-with-checkbox/#findComment-838688 Share on other sites More sharing options...
TheFilmGod Posted May 21, 2009 Author Share Posted May 21, 2009 Tables wouldn't be worth it - poor semantics and it would just bloat my code. I might as well use an IE override css. Is there some other way? Maybe a container div or something? Quote Link to comment https://forums.phpfreaks.com/topic/159023-align-text-with-checkbox/#findComment-838969 Share on other sites More sharing options...
Hybride Posted May 21, 2009 Share Posted May 21, 2009 You could do something like: <div id="checkcontainer"> <div id="checks">checkboxes</div> <div id="text">check text</div> </div> Align the check boxes to the left, the text to the right, etc. Quote Link to comment https://forums.phpfreaks.com/topic/159023-align-text-with-checkbox/#findComment-839073 Share on other sites More sharing options...
Axeia Posted May 21, 2009 Share Posted May 21, 2009 Wouldn't make sense for browsers without CSS support.. although they could still relate the items to eachother if you use labels properly.. but still, I wouldn't do that. Exactly what are you after? text [x] some other text [x] But then like text [x] some other text [x] ? Quote Link to comment https://forums.phpfreaks.com/topic/159023-align-text-with-checkbox/#findComment-839130 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.