How to align checkboxes and their labels consistently cross-browsers??Ask a question
This is one of the minor CSS problems that plagues me constantly. How do folks around Stack Overflow vertically align checkboxes and their labels consistently cross-browser? Whenever I align them correctly in Safari (usually using vertical-align: baseline on the input), they’re completely off in Firefox and IE. Fix it in Firefox, and Safari and IE are inevitably messed up. I waste time on this every time I code a form.
Here’s the standard code that I work with:
<form> <div> <label><input type="checkbox" /> Label text</label> </div> </form>
- 0What is the best way to align elements to vertically center in CSS
- 0C++ book guide and list
- 0undefined behavior and sequence points
- 1main function signature in C and C++
- 0What is the copy-and-swap idiom
- 0Pointless if-else and do-while in
- 0Difference between copy initialization and direct initialization
- 0C++: difference between 'struct' and 'typedef struct'
- 0public, protected and private inheritance
- 0Meanings of zero-, value- and default-initialization
- 0How do malloc() and free() work?