Discussion Locked

HTML: Alter margins of submit button?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Why do submit buttons have a 20 pixel or so margin on each side of the text? I mean is it really necessary to have all that open space-- I am not looking for a place to graze cattle on.

I am putting in an add to shopping cart button, and I could fit it into the space I need to, if I just got rid of those pesky margins. Is there a way?

I know I could use an image instead, but let's face it, making a cool button with css and text is a way better way for me to waste time.

3 replies

by johnm

Images take time to load. I want my customers to buy, not watch paint dry on the wall.

by johnm

Ok, if anyone wants to get rid of those margins, I finally found a solution:

.button {
padding: 0 5px;
width: 100% 100%;
overflow:visible;
}

Ok, the syntax of the width attribute looks funny, but hey, it works on IE and netscape (dont know about moz, op, fb, etc...) :p

Now my "Add to Shopping Cart" button is not as long as the New York marathon.

**************************
Guinness as usual

This discussion is closed to new replies.