Solved

remove margin around checkbox

Posted on 2006-07-10
3
863 Views
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
.check{
margin: 0px;
border: 0px;
}
But I could not...

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

portal123
0
Comment
Question by:portal123
[X]
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
3 Comments
 
LVL 18

Assisted Solution

by:Eternal_Student
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.
0
 
LVL 30

Accepted Solution

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

.check{
  margin: 0px;
  border: 0px;
  background: red;
}

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

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


The workaround is to use negative margins:

.check{
  margin: 0px;
  border: 0px;
}

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

Author Comment

by:portal123
ID: 17079421
Thanks both guys.

I use negative margin and it works well.

Best Wish, portal123
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

733 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