PDA

View Full Version : CSS Help Form button alignment



TotoTitus
6 Sep 2010, 8:56 AM
Hi,

I have a form and want to position one buton on the right side, and the other one on the right side of the form.
I haven't specified buttonAlign property, but it automatically aligned both buttons on the right. That's OK for one of them, but how do i drag the other one to the left?

There are 1 or 2 more threads about this problem, but i haven't found anything which would solve my problem right now.

Here's my code:



var loginForm = new Ext.FormPanel({
title: 'Login to goodTalk',
frame: true,
bodyStyle:'padding:5px 5px 0',
renderTo: 'innermost',
items: [//blabla],
buttons: [{
//First button, needs to be aligned left
text: 'Register',
style: 'align: left;', //For some reason, it does not align.
//blabla
},{
//Second button, aligned correctly
text: 'Login',
//blabla
}]
});

Animal
6 Sep 2010, 9:15 AM
buttonAlign: 'left'

with a

'->'

TotoTitus
6 Sep 2010, 9:32 AM
Wow, didn't know a spacer is valid in a buttonarray.
thanks !

Animal
6 Sep 2010, 10:00 AM
It's just a Toolbar.

"buttons" as an Array is deprecated. The correct, full specification is



buttonAlign: 'left',
fbar: {
items: [{
//First button, needs to be aligned left
text: 'Register',
style: 'align: left;', //For some reason, it does not align.
//blabla
}, '->', {
//Second button, aligned correctly
text: 'Login',
//blabla
}]
}

TotoTitus
6 Sep 2010, 11:29 AM
done.thanks.