Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ppc_michael

Guest
Original poster
Apr 26, 2005
1,498
2
Los Angeles, CA
I'm having some weird issue with a checkbox for a login form I'm doing. A screenshot is attached, but basically the checkbox is slightly above the label. This occurs in Safari and Firefox on the Mac. I haven't checked with Windows yet.

The HTML looks like this:
Code:
<input type="checkbox" id="remember" name="remember" /><label for="remember">Remember Me</label>

I haven't applied any special CSS. Any ideas?
 

Attachments

  • SafariScreenSnapz001.png
    SafariScreenSnapz001.png
    9.3 KB · Views: 124
You'll need to push the input checkbox down or the label up to make it nice and pretty. Font size can affect it the positioning of the text.
 
You can tweak things with vertical-align:
Code:
input {
 vertical-align: text-bottom;
}
 
Thanks! Vertical-align does nothing, but adding some top margin moves it. Now it looks good in Safari but too low in Firefox. :rolleyes:

Vertical-align works in certain situations. I wasn't sure what code existed around your input tag. If you have an li or p tag around it, it should work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.