473,698 Members | 2,068 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
22 19438
>On the web they never will whatever you do. Different screen resolutions,
etc. cause the font to be different no matter what.


I agree with all that. But...

This is not a public site, it's an internal web app with known
browsers, users and pre-existing standards.

Jul 20 '05 #11
On Thu, 08 Jul 2004 04:10:57 -0400, moocow <no****@nospam. net> wrote:
On the web they never will whatever you do. Different screen
resolutions,
etc. cause the font to be different no matter what.


I agree with all that. But...

This is not a public site, it's an internal web app with known
browsers, users and pre-existing standards.

Right. This isn't an intranet newsgroup either, though.
Jul 20 '05 #12
On Thu, 08 Jul 2004 05:18:45 -0400, Neal <ne*****@yahoo. com> wrote:
Right. This isn't an intranet newsgroup either, though.


I appreciate your input on fonts, but how I might remove a stubborn 1
pixel of padding in a form button in IE using CSS when the standard
ways are not working...was the posted query.

I was not really interested in talking in circles or posturing.

If this is not the place to find out how I might remove a stubborn 1
pixel of padding in a form button in IE using CSS when the standard
ways are not working...then I have made an error.

Jul 20 '05 #13
Els
moocow wrote:
On Thu, 08 Jul 2004 05:18:45 -0400, Neal
<ne*****@yahoo. com> wrote:
Right. This isn't an intranet newsgroup either, though.


I appreciate your input on fonts, but how I might remove a
stubborn 1 pixel of padding in a form button in IE using
CSS when the standard ways are not working...was the posted
query.

I was not really interested in talking in circles or
posturing.

If this is not the place to find out how I might remove a
stubborn 1 pixel of padding in a form button in IE using
CSS when the standard ways are not working...then I have
made an error.


Without a url it is very difficult for people to see where 1
pixel comes from. I for one, usually copy the complete code of
a page locally, and fiddle with the CSS to see where something
went wrong. Without a url, I can't do this.

Only thing I can imagine from what I read of your posts,
because you're saying Firefox doesn't have the problem, is
that it is the difference between calculating widths of
elements with or without including borders/margins.
Some browsers include it, others don't.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 20 '05 #14
On 8 Jul 2004 09:52:40 GMT, Els <el*********@ti scali.nl> wrote:
Without a url it is very difficult for people to see where 1
pixel comes from. I for one, usually copy the complete code of
a page locally, and fiddle with the CSS to see where something
went wrong. Without a url, I can't do this.

Only thing I can imagine from what I read of your posts,
because you're saying Firefox doesn't have the problem, is
that it is the difference between calculating widths of
elements with or without including borders/margins.
Some browsers include it, others don't.


I'd like to give you a URL, but can't, so I understand why it's hard
to help.

I used TopStyle and went through all the CSS1 and CSS2 parameters for
spacing and padding that might work for a form button. It's a nice app
to immediately see what effect your settings have. But no luck in
elminating that pixel.

I think I can live with that one pixel until I come across a work
around for it.

Thanks.
Jul 20 '05 #15
On Thu, 08 Jul 2004 06:45:13 -0400, moocow wrote:
I'd like to give you a URL, but can't,


Why not, exactly?

For what reason can you not bring up the page
in IE (whatever) 'Save As' complete.. and upload
the files to a cheap web site.

[ I realize the question above may sound sarcastic,
but I am honestly curious whether it occured to the
folks at your end, and if so, what the hitch is.. ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 20 '05 #16
moocow wrote:
I appreciate your input on fonts, but how I might remove a stubborn
1 pixel of padding in a form button in IE using CSS when the
standard ways are not working...was the posted query.
Indeed. Unfortunately for you, it was posted in the wrong group. In
the *.www.authoring* groups, we discuss authoring for the www. I'd
have overlooked it, but you did not follow the conventions of the
group (lurk before posting, read the faq, read the archives, etc). So
as far as I'm concerned, it's off-topic, take it to a more appropriate
group.
If this is not the place to find out how I might remove a stubborn
1 pixel of padding in a form button in IE using CSS when the
standard ways are not working...then I have made an error.


Indeed you did make an error.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #17
On Thu, 08 Jul 2004 12:12:46 GMT, Andrew Thompson <Se********@www .invalid>
wrote:
On Thu, 08 Jul 2004 06:45:13 -0400, moocow wrote:
I'd like to give you a URL, but can't,


Why not, exactly?

For what reason can you not bring up the page
in IE (whatever) 'Save As' complete.. and upload
the files to a cheap web site.


.... after, of course, altering all the content so as not to publish
proprietary info.
Jul 20 '05 #18
On Thu, 08 Jul 2004 12:12:46 GMT, Andrew Thompson
<Se********@www .invalid> wrote:
Why not, exactly?

For what reason can you not bring up the page
in IE (whatever) 'Save As' complete.. and upload
the files to a cheap web site.


The site is on an intranet, so that's why a URL won't work.

I hadn't thought of that--uploading the page to a cheapo ISP
account...

http://209.123.115.33/test/test.html

There are two sets of buttons, form buttons and regular linked image
buttons.

I have set the background color of the form buttons to red, so that
the 1 pixel border is easy to see.

And as metioned before, this border shows in IE, but not in Firefox.

Thanks.

Jul 20 '05 #19
On Thu, 08 Jul 2004 16:17:29 -0400, moocow <no****@nospam. net> wrote:
On Thu, 08 Jul 2004 12:12:46 GMT, Andrew Thompson
<Se********@ww w.invalid> wrote:

http://209.123.115.33/test/test.html

There are two sets of buttons, form buttons and regular linked image
buttons.

I have set the background color of the form buttons to red, so that
the 1 pixel border is easy to see.

And as metioned before, this border shows in IE, but not in Firefox.


It might also interest you to know that Opera (6.06) doesn't style the
button at all: no image, no border, not even background color!

My main point, though, is that browser support for styling form
widgets is shakey; other than Mozilla, most of the browsers use
buttons which aren't described by CSS but instead just hard-coded to
look like the local UI to some extent. IE is a little more flexible,
but the limitations are still there.

As a final note, maybe you could pick a neutral blue as the background
color and set that same blue as a one-pixel border on the links? They
wouldn't look quite like you imagined, but at least they'd all look
the same (in IE) and I don't think anyone would really notice one
pixel of non-gradient and think "that looks really weird!".

Good luck,
-Claire
Jul 20 '05 #20

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

Similar topics

7
2231
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
20229
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
2106
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
9574
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
1673
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
5792
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 button. 2) To exclude the said checkbox from the CLEAR button function. 3) To have the CLEAR button run...
1
5702
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 like now: Option Compare Database Private Sub close_Click() On Error GoTo Err_close_Click ...
2
2080
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 adding a new record from a form and I am half way filling up everything and suddenly if I change my...
3
2903
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 form that when clicked: - Firstly, appends the CURRENT record, in its current state, into the...
0
8673
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4365
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3043
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
3
1998
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.