PDA

View Full Version : style buttons to look like tabs



Kodo
26 Feb 2010, 6:55 AM
Hey guys, I'm trying to figure out how to style a button to look like a tab.
1. can it be done?
2. if it can what css classes do I need to override to use the tab sprite?

I've tried a few things, but quite frankly, I've not managed to get too far with it. I found some other examples of people styling buttons but not using the tab sprite so if someone could point me in the right direction, I'd appreciate it.

Thanks.

26 Feb 2010, 6:58 AM
anything can be done. What *you* need to do is use firebug to inspect the buttons and you'll find a treasure trove of information.

http://getfirebug.com

Kodo
26 Feb 2010, 7:12 AM
wouldn't have posted here if I didn't already do that; I'm not a spooner and I do, in fact, put an effort into finding out answers for myself and I only use forums when I am at an impasse (hence this only post). ;) so please bear with me.

I'm also NOT a css guru by any stretch of the imagination so I'm more or less looking for confirmation that I indeed have the proper classes.

.x-btn-tl
.x-btn-tc
.x-btn-tr

.x-btn-bl
.x-btn-bc
.x-btn-br

.x-btn-ml
.x-btn-mc
.x-btn-mr

I'm assuming that's LEFT, CENTER, RIGHT (respectively)

I can only get "something" to change on mouse over.. I can't seem to get the other states styles in place at all.

Thanks.

realjax
26 Feb 2010, 7:17 AM
Yup, let's face it.. (re)styling buttons is a major pain in Ext.
Maybe this thread (http://www.extjs.com/forum/showthread.php?t=57130) can help you a little.

Kodo
2 Mar 2010, 2:45 PM
Thanks, I finally got around to trying to work with this again, and yes.. that post helped me sort out the styles. Now I at least have one set of styles working. Much tweaking to be done, but I have something to work with.

Thanks.