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

Centering images in the toolbarbutton element

7 views
Skip to first unread message

James Newell

unread,
Nov 5, 2006, 10:35:07 PM11/5/06
to
Hi.
Just wondering if theres a way to center images and text within the
toolbarbutton element in an xulrunner application?

Tried playing with -moz-box-align, text-align etc

Thanks,
James

Neil

unread,
Nov 6, 2006, 3:21:35 AM11/6/06
to
James Newell wrote:

>Just wondering if theres a way to center images and text within the toolbarbutton element in an xulrunner application?
>
>Tried playing with -moz-box-align, text-align etc
>
>

I think it might be pack="center" or -moz-box-pack: center; in a style
sheet.

--
Warning: May contain traces of nuts.

James Newell

unread,
Nov 6, 2006, 4:50:16 PM11/6/06
to

I'm using

toolbarbutton {

min-width: 40px;

-moz-box-orient: horizontal !important;
display: -moz-box !important;
-moz-box-pack: center !important;
-moz-box-align: center !important;

}

and the images are 22px wide. All properties seem to have no visual
change except the orientation with the text visible. I have seen
classes such as "toolbarbutton-text" and ones for drop marker etc but
the class name is slightly different on different sites. Do I need to
use one of these classes? And what are the correct ones?

Thanks

Neil Deakin

unread,
Nov 6, 2006, 5:14:39 PM11/6/06
to

The label and image should already be centred. Maybe you're using a
different theme?

Neil

James Newell

unread,
Nov 7, 2006, 3:17:37 PM11/7/06
to
The theme/skin is definitely working because if I give the window a
border in the same sheet, it is visible on the form. The button images
are still not centered horizontally however if I set the orientation to
vertical, the text is centered horizontally. I'm using xulrunner
1.8.0.4 on WinXP.
0 new messages