Solved

remove margin around checkbox

Posted on 2006-07-10
3
861 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
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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 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 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…

777 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