Solved

remove margin around checkbox

Posted on 2006-07-10
3
859 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
3 Comments
 
LVL 18

Assisted Solution

by:Eternal_Student
Eternal_Student earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks both guys.

I use negative margin and it works well.

Best Wish, portal123
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now