Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

button with image only .. size of button

5 views
Skip to first unread message

neandr

unread,
Jun 14, 2011, 1:27:44 PM6/14/11
to
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?

M.-A. DARCHE

unread,
Jun 14, 2011, 3:21:31 PM6/14/11
to dev-ext...@lists.mozilla.org

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

neandr

unread,
Jun 15, 2011, 2:27:49 AM6/15/11
to
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 new messages