473,563 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

form button margin

Hi.

I am using a background image in a form button. The problem I am
having is that there is a 1 pixel margin inside the button on all
sides.

I would like my background image to fill the inside of the button from
button border to button border, and not stop 1 pixel shy of that.

I have tried:
margin-top:0; margin-left:0; margin-right:0; margin-bottom:0;

This does nothing.

Also:
margin-top:-1; margin-left:-1; margin-right:-1; margin-bottom:-1;

This does get rid of the margin, but it also gets rid of the button
border.

This is what I'm using and it mostly works...the only problem is the 1
pixel buffer inside the button:

..fbutton1 {
text-align:middle; vertical-align:top;
font-family:Arial,Ve rdana; font-size:11px; font-weight:bold;
color:#000000;
background-image: url(../images/button_fill1.jp g);
border-top:#EFF4F9; border-bottom:#62707D; border-left:#EFF4F9;
border-right:#62707D;
border-top-width:1px; border-left-width:1px; border-right-width:1px;
border-bottom-width:1px;
border-style:solid;
padding-top:0px; padding-left:0px; padding-right:0px;
padding-bottom:0px;
margin-top:0; margin-left:0; margin-right:0; margin-bottom:0;
}

Thanks.
Jul 20 '05 #1
22 19411
moocow wrote:
I am using a background image in a form button. The problem I am
having is that there is a 1 pixel margin inside the button on all
sides.
If the space is inside the border, then it's padding you're seeing.
I would like my background image to fill the inside of the button from
button border to button border, and not stop 1 pixel shy of that.
..fbutton1 {
padding: 0;
}

should work. It may be a browser issue. In any case, _as always_, we
need a url to help you.
This is what I'm using
Whoa! You got a whole lotta code there. Are you sure you want to
change the appearance of a form widget that much? Might be bad for
usability. If you do, at least consider simplifying a bit, and correct
the mistakes in design that you should have known about if you lurked
in ciwas for some time.
font-family:Arial,Ve rdana; font-size:11px;
No! Don't set font-size in px!
font-weight:bold;
color:#000000;
If you set a color, then set a background color, too.
border-top:#EFF4F9; border-bottom:#62707D; border-left:#EFF4F9;
border-right:#62707D;
border-top-color: #EFF4FF9; /* etc. */
border-top-width:1px; border-left-width:1px; border-right-width:1px;
border-bottom-width:1px;
/* simplify */
border-width: 1px;
padding-top:0px; padding-left:0px; padding-right:0px;
padding-bottom:0px;
/* simplify */
padding: 0;
margin-top:0; margin-left:0; margin-right:0; margin-bottom:0;


/* simplify */
margin: 0;

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
On Wed, 07 Jul 2004 18:00:45 -0400, Brian
<us*****@juliet remblay.com.inv alid> wrote:
.fbutton1 {
padding: 0;
}
Yes, it's padding that doesn't seem to want to go away. I have tried
your suggesstion and also form {padding:0} with no luck.
should work. It may be a browser issue. In any case, _as always_, we
need a url to help you.
The browser is the latest 6.x IE. I can't post the URL, but if you
think you can help, I can email you the one HTML and CSS file.
Are you sure you want to change the appearance of a form widget
that much?
Yes, I am absolutely positive. I am trying to get the forrm buttons to
look like all the other non-form buttons on the site. With out
resorting to images
If you do, at least consider simplifying a bit, and correct

the mistakes in design that you should have known about if you lurked
in ciwas for some time.


I've only just arrived!
Whoa!
The "proper syntax" changes you suggested I should do.

Things like specifying the left, right, top and bottom margins
individually instead of just margin:0 was done intentionally
because this is a "skin", and I am making it easier for users
to customize the settings.
No! Don't set font-size in px!


Why not?!? Ok, pt instead...

Thanks for your input! I'll make those syntax correction. Now
if I can just get rid of the padding.

-me-
Jul 20 '05 #3
Hmm. I found the answer.

Oddly enough, using this:

background:url( ../images/button_fill1.jp g);

instead of this:

background-image: url(../images/button_fill1.jp g);

Eliminates the 1 pixel padding on the inside of the button. I'm
not sure why that is.

-me-
Jul 20 '05 #4
Actually, it didn't work, it just pretended to. :(
On Wed, 07 Jul 2004 19:35:50 -0400, moocow <no****@nospam. net> wrote:
Hmm. I found the answer.

Oddly enough, using this:

background:url (../images/button_fill1.jp g);

instead of this:

background-image: url(../images/button_fill1.jp g);

Eliminates the 1 pixel padding on the inside of the button. I'm
not sure why that is.

-me-


Jul 20 '05 #5
I have noticed that this 1 pixel padding on the inside of the
form button does not show up in Mozilla Firefox .8.

Jul 20 '05 #6
moocow wrote:
Brian wrote:
In any case, _as always_, we need a url to help you.
I can't post the URL, but if you think you can help,


I don't know if I'll have the answer or not. I'd have to see a test
case first.
I can email you the one HTML and CSS file.
No thanks. I don't have the time to download and test such things. We
need a url, since we have to see it in its natural habitat. An
isolated file may hide other issues.
I am trying to get the forrm buttons to look like all the other
non-form buttons on the site.
Won't that just confuse visitors? Wouldn't they want to be able to
distinguish between a form control and, uh, hang on, what do you mean,
"non-form buttons"? What do those buttons do?
correct the mistakes in design that you should have known about
if you lurked in ciwas for some time.


I've only just arrived!


That was sort of my point. You might have learned about the problem
with pixel sized fonts or color without background color if you had
read the group for a bit. Instead, I'm generating more noise
explaining it to you.
Things like specifying the left, right, top and bottom margins
individually instead of just margin:0 was done intentionally
because this is a "skin", and I am making it easier for users to
customize the settings.
Is this, finally, a www.authoring question? Or something else?
No! Don't set font-size in px!


Why not?!?


Your preferred font-size is not the same as my preferred size, or the
preferred size of someone else. If you set it in px, MSIE/Win users
will be unable to resize the text to something they find more
comfortable, unless they disable your stylesheet completely. I imagine
that's not what you want. Mozilla and Opera are better: they let one
resize text even when it's set in px. But why should they have to?
Leave the font size for main body text unset, and users get what's
configured in their browser.
Ok, pt instead...


That's at least as bad.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #7
Won't that just confuse visitors? Wouldn't they want to be able to
distinguish between a form control and, uh, hang on, what do you mean,
"non-form buttons"? What do those buttons do?
No, they don't need to distinguish.

In this case, "non-form" buttons are just linked button images.
That was sort of my point. You might have learned about the problem
with pixel sized fonts or color without background color if you had
read the group for a bit. Instead, I'm generating more noise
explaining it to you.
I think that was a choice of your own free will.
Is this, finally, a www.authoring question? Or something else?
No, I have no www.authoring related questions.
Your preferred font-size is not the same as my preferred size, or the


Yes, but sometimes fonts need to be set and stay set...
Jul 20 '05 #8
moocow wrote:
No, I have no www.authoring related questions.


I guess it's safe to ignore you, then. Thanks for being honest.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #9
On Thu, 08 Jul 2004 00:59:37 -0400, moocow <no****@nospam. net> wrote:

Your preferred font-size is not the same as my preferred size, or the


Yes, but sometimes fonts need to be set and stay set...


On the web they never will whatever you do. Different screen resolutions,
etc. cause the font to be different no matter what.

Might as well work with that. Use % to indicate font size. 100% is what
the user prefers to read, if the user set anything. If not, it's what the
user is accustomed to. So don't go too far below that.

px, whether it's legible or not to the user is anyone's guess. I thought
you wanted people to read your content?
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2226
by: PhilM | last post by:
perhaps I am just a little tired, but I am having trouble with my form buttons. Firstly I name them like this name=\"round".$counter."heats\" which results in variables $round1heats $round2heats $round3heats etc...
2
20225
by: Bill Cherepy | last post by:
Is it possible to have a tooltip over a form button? I did a search, but no help. Thanks, Bill Cherepy Grayson, GA
2
2099
by: harleyman1974 | last post by:
I need to programatically "click" a form button from a c++ or c# application which is found on a page. I need to post data to a page and have it interpret the post as a click occured, but I am not sure how to do this. Help?
4
9564
by: ghadley_00 | last post by:
Hi, Can anyone recommend a piece of VBA code I could attach to a button in a MS Form form that will close the current form and bring the switchboard to foreground. I'm trying to integrate a form of buttons into the way the switchboard gets used. Best wishes, George Hadley
1
1668
by: regelcom | last post by:
My son is trying to create an about form button for a form he has already created. Any help would be great. Thanks
5
5781
by: plumba | last post by:
Ok, another query.... I have a checkbox at the bottom of my form which when checked unhides a <div> block which displays the submit button. The problem I have is when the clear form button is pressed it removes the check but does not re-hide the submit <div> bit. The way i see it, I have 3 options: 1) To simply remove the clear for...
1
5696
by: joshapalooza | last post by:
I am using a form to sort a report, but I can't seem to get the "clear form" button to work. I used the wizard when I installed the button, using the clear form option under the form option list. What I want to be able to do is clear the information on the drop down combo box in case I want to change the sort order. This is what the code looks...
2
2075
by: Hulas | last post by:
Guys, I have two questions. (a) How do I add two fields of the same table to a single combo box. For example if I have two fields ID1 and ID2 in a table called Identification, than how should I design a combobox in a form such that when I scroll down I get to see both the ID's. (b) I have a (Close Form) button on a form. Let's say I am...
3
2901
by: KevinC | last post by:
Hi All, I have two tables: tblLicensedPrem and tblLicensedPremHistory (these tables are identical). tblLicensedPrem contains records for licensed premises. Over time details of a licensed premises change: e.g. the premises changes its company name, opening hours, manager, telephone number etc What I would like to do is add a button to a...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.