[thelist] CSS-How to get checkbox without 'indent'?

Jeff Howden jeff at jeffhowden.com
Fri Sep 19 13:41:11 CDT 2003


> From: Jay Blanchard
> I know that I have seen this somewhere before, now I am
> trying to do it and cannot find it. For the INPUT
> selector I want to create a class for checkbox where
> the checkbox only has a 1px border around it without the
> usual fomat of the checkbox (the little indented box).
> Here is my descriptor for that so far
> INPUT.checkbox{
> 	font-family: courier;
> 	border: 1px solid;
> 	background-color : transparent;
> }
> But this still displays the little indented box. Anyone
> have a quick solution?

unfortunately there isn't any way to do what you want across the board with
modern browsers.  i believe that moz and opera will allow you to change the
border properties of the checkbox.  however, ie will apply the border
outside the visible border of the checkbox.

the only completely cross-browser way to get a consistent look is to do
something silly with dual-state images and scripting.  however, not done
carefully you can render your form unusable to some user-agents.


Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/

More information about the thelist mailing list