Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

remove margin around checkbox

Posted on 2006-07-10
3
Medium Priority
?
867 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 1000 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 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

604 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