remove margin around checkbox

Posted on 2006-07-10
Last Modified: 2008-02-01
Hello, I'd like to remove margin around checkboxes on I.E. I tried to remove it by  class="check"

Inside style sheet
margin: 0px;
border: 0px;
But I could not...

Do you know a better way to remove margin around checkboxes??

Question by:portal123
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 18

Assisted Solution

Eternal_Student earned 250 total points
ID: 17072774
Have you tried setting the margin for the checkbox to a negative value?

I wouldnt really advise that but I know no other way.
LVL 30

Accepted Solution

GrandSchtroumpf earned 250 total points
ID: 17072793
Add some background color and you'll see it's not margin:

  margin: 0px;
  border: 0px;
  background: red;

It's some sort of padding... but it cannot be removed with "padding: 0;":

  margin: 0px;
  padding: 0px;
  border: 0px;
  background: red;
^----- that does not change anything.

The workaround is to use negative margins:

  margin: 0px;
  border: 0px;

* html .check{
  margin: 0 -2px 0 -3px;

Author Comment

ID: 17079421
Thanks both guys.

I use negative margin and it works well.

Best Wish, portal123

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question