button with image only .. size of button

How to display a "button with an image only", but to limit it's width to 
the image width plus a few px's?
Also I need to show the button's boarders.

Here is what I have, but the button is very wide:
..abutton {
   list-style-image: url("chrome://my/ext/somesub/buttons16.png");
    -moz-image-region: rect(0px,32px, 16px,16px);
}

and in XUL
<button class="abutton" tooltiptext="some hint"
   id="abuttonId" onclick="doit();" align="center"/>

Adding min-width="0.1px" to the .abutton CSS doesn't have an effect.

With Chromebug I can edit the (standard) 'button' which has 
min-width="6.3em" to set min-width="0.1px"
and that makes the effect. But no chance to define it with CSS.

Any hint?
0
neandr
6/14/2011 5:27:44 PM
mozilla.dev.extensions 5694 articles. 0 followers. Post Follow

2 Replies
557 Views

Similar Articles

[PageSpeed] 37
Get it on Google Play
Get it on Apple App Store

Le 14/06/2011 19:27, neandr a �crit :
> How to display a "button with an image only", but to limit it's width to
> the image width plus a few px's?
> Also I need to show the button's boarders.
> 
> Here is what I have, but the button is very wide:
> .abutton {
>   list-style-image: url("chrome://my/ext/somesub/buttons16.png");
>    -moz-image-region: rect(0px,32px, 16px,16px);
> }
> 
> and in XUL
> <button class="abutton" tooltiptext="some hint"
>   id="abuttonId" onclick="doit();" align="center"/>
> 
> Adding min-width="0.1px" to the .abutton CSS doesn't have an effect.
> 
> With Chromebug I can edit the (standard) 'button' which has
> min-width="6.3em" to set min-width="0.1px"
> and that makes the effect. But no chance to define it with CSS.
> 
> Any hint?
>

Try to set width and min-width at the same time in the CSS.

If doing this way works the answer is: this is because the default CSS
you are overriding defines those values at the same time.


Cheers,

-- 
Marc-Aur�le DARCHE          https://developer.mozilla.org/User:madarche
AFUL                        http://aful.org/
Association Francophone des Utilisateurs de Logiciels Libres
French speaking Libre Software Users' Association
0
M
6/14/2011 7:21:31 PM
Am 14.06.2011 21:21, schrieb M.-A. DARCHE:
>> Adding min-width="0.1px" to the .abutton CSS doesn't have an effect.

Shame on me .. typo: NOT min-width="0.1px" BUT min-width:0px
;)
0
neandr
6/15/2011 6:27:49 AM
Reply:

Similar Artilces:

when is button not a button?
How can I substitute an .gif file for the default display of the button? I know there must be a simple way to do so.iisdem furoribus Use an asp:imagebutton and set the ImageUrl ... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsImageButtonClassTopic.asp...

I Want to create a tool box,toolbox contains image button and fileupload.These two buttons can be added at runtime(user can add any number of image button and fileupload button dynamically by click)
I Want to create a tool box,toolbox contains image button and fileupload buttons.These two buttons can be added at runtime(user can add any number of image button and fileupload button dynamically by click).for every image user will browse images using fileuploader and he will add the image to that imagebutton at runtime. how to write server side coding to upload the selected image and to set that image to imagebutton at runtime? is it possible? any other way to do it?  advance thanks ask123: I Want to create a tool box,toolbox contains image button and fileupload b...

asp:Button with image and Usesubmitbehavior=False [But not asp:image button]
I want's to use asp:Button with Images and set there UseSubmitBehavior Property to False so that they cannot behave like a submit button[I don't want's to use asp:ImageButton as there isn't any UseSubmitBehavior property there] Any suggestion How Can I achieve itWhat I am having a problem is thatI have a Master page on which top area there is a loginStatus controlwhen ever I enter on a page I get logout   <body>     <form id="form1" runat="server">         <table ali...

Create Image Button as Print Button
Hi Friends, I am working on an project which was started in Visual Studio 2003. I have to create a Image Button as Print button on the Click Event of it i want to Print the Page. How can i detect my default printer and print the page? I know its quite big topic in itself. I am not expecting code or something, but a reference or an article ,would be also great help.   Thanks  Menon  You can simply use the window.print(); javascript function call. Hope this helps. www.hopeasp.net Thanks Dude, I will do go for this. Thanks Menon...

change other image button image by click html link button by javascript code ?
Hello friend,I want to know that how to change other image button image by click html link button by javascript code ?Please give me reply as soon as possible.Thanks,Rupen   You can try this:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> &nb...

website is not showing any BUTTON, IMAGE BUTTON, IMAGE BOX, ACTIVE HYPERLINK etc .
hi friends frist of all thanks for the previous help now there is new problem i am facing that is i made a website for ABC_COMPANY and store it in file system that is d:\ABC_COMPANY now i copy this folder into CD and paste it on my client's computer ( which is not connected to my computer ) in file system c:\Inetpub\wwwroot\ABC_COMPANY now when i try to run this website on his computer with writing the address in IE http://localhost/ABC_COMPANY/default.aspx the website runs BUT the website is not showing any BUTTON, IMAGE BUTTON, IMAGE BOX, ACTIVE HYPERLINK etc . the only thin...

Confirm Button Extension with Wizard buttons?
Hi I would like to use the AJAX confirm button extension, but I am trying to attach it to the "FinishButton" that is automatically created with the ASP Wizard. So in a nutshell when a user clicks the "finish" button in my wizard a message box will pop up asking the user if they are sure they would like to continue. I'm using VWD2005 express and scripting in visual C#. Please can someone help me out or point me in the right direction?   Cheers!!! Hi  I managed to solve this one! Woooohoooo.  If anyone is interested then...

Button Button who's got the Button
I just started learning Visual Studio.NET so I'm sure there is some stupid setting I am overlooking, but here is my dilema. I've created a new webform WebForm1.aspx. Then I have placed a Button control on my webform and added some simple C# code to the Click event. Last I Build and Browse WebForm1.aspx, but lo and behold no button! I view the source and I can see the code for the button but it won't show in the browser. So I looked around and found another Button control on the HTML section of the toolbox. When I place that on my webform with the same C# click code, the button does show on t...

display image in a image image button
hi   i have to display an image in image button while uploading mycode Image1.ImageUrl = Upload.PostedFile.FileName; is not working thanks Hi You need to save the PostedFile to the disk on the server and then assign it to ImageUrl. Take a look at the following links for more infoprmation on how to do this.  http://www.codeproject.com/KB/aspnet/netimageupload.aspx http://www.stardeveloper.com/articles/display.html?article=2003022601&page=1Reza Nassabehwww.professionalcsharp.comDon't forget to click "Mark as Answer" on the post that helped you. That way ...

change the createuserwizard control button to image button
hi, is there a way to change the createuserwizard "Create User" and "Cancel" button? i want to change it to an image button. i tried to convert it in template, but i can only modify the steps and textboxes. thanks ok, i missed out the custom navigation part   <CustomNavigationTemplate> <table border="0" cellspacing="5" style="width:100%;height:100%;"> <tr align="right"> <td align="right" colspan="0"><asp:Button ID="StepNe...

How to set multiple image button as default button
hi,    I have two image button on my master page .I need to set both of them as default button .My script is given below: SetDefaultButton(this.Page, pass, LoginButton); SetDefaultButton(this.Page, pass, imgSearchButton); pass is textbox where enter button occur.    public void SetDefaultButton(Page page, TextBox textControl, Button defaultButton)    {                 string theScript = @"<SCRIPT language=""javascript"">     &n...

Prevent Image Button from becoming submit button
 Hi All,On my master page I have a button(ABC) which has a submit property as true,as soon as I added a Image button on the same page the image button became  default submit button.Kindly suggest how to keep button(ABC) as default button.RegardsDeep The easiest would be to add a panel around your content and set DefaultButton property to true: <asp:Panel DefaultButton="button1">...</asp:Panel> "button1" will be the Id of the button that should be the defaul submit button Happy coding Sincere Regards,dev_2580---tollerate an enemy and love a bot...

A Button to make Buttons?
Hi everyone, I am pretty new to programming VCL, and I am also new to C++ builder 2009 so I am still trying to figure everything out, so this might be an obvious question, but anyway... I am trying to create a form that has very dynamic behavior. The form basically has a button, and when I press this button a frame with another button should be drawn on this form. The main form should be able to create up to 'X' (lets say 5) instances of this frame on the main form. What I did so far is, I created a class for the frame I want to add to the main form. This frame includes the...

HTML Image Button to call ASP Button Function
Hi Guys, If i want to make use of the html image button to perform the asp button "next1" function, how should i phrase my code? I would like to have only the html image button and remove the asp button. But i want my html image button to be performing the functions done by the asp button as well. Currently, I'm having this piece of code for the html image button : <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" onClick="document.pressed='Paypal'" ...

Web resources about - button with image only .. size of button - mozilla.dev.extensions

Button - Wikipedia, the free encyclopedia
In modern clothing and fashion design , a button is a small fastener , now most commonly made of plastic , but also frequently of metal, wood ...

50,000 Websites Add Facebook's Like Button And Social Plugins In First Week
50,000 Websites Add Facebook's Like Button And Social Plugins In First Week

Chrome 48 Beta brings custom buttons on notifications, casting from the web, more
With Chrome 47 currently rolling out to desktops and Android, Google has announced the Chrome 48 Beta and the new features that will come with ...

Facebook Testing ‘Buy Tickets’ Button for Concerts
... to rock out with their, um, devices out. The social network confirmed to BuzzFeed News that it is testing a “Buy Tickets” call-to-action button ...

Carcassonne developer does interactive fiction with One Button Travel for iOS
... the twitch puzzle game Rules . And now, TheCodingMonkeys haveentered yet another new genre, interactive fiction, with the release of One Button ...

Amazon deal: Accept calls with the touch of button with these in-ear headphones
You'll be able to hear both music and phone conversations perfectly with a set of in-ear headphones that have a control talk function with iOS ...

Social media users don't like buy buttons
Active social media users around the world do not care to have buy buttons made available to them, according to GlobalWebIndex cited by eMarketer. ...

The labor ruling that's now a hot-button political issue
NLRB's decision to hold companies accountable for staffing agency violations is enmeshed in the wide-ranging federal spending bill

Hot-Button Issues In The Climate Talks
... so far) have now submitted their nationally determined contributions to reducing emissions and keeping global temperatures [&hellip Hot-Button ...

How to bring back the Google Now Home button shortcut in Android 6.0
One of the marquee features in Android 6.0 is Google Now on Tap , a new system-wide contextual assistant that's wildly impressive some of the ...

Resources last updated: 12/12/2015 8:08:12 AM