How Does One Center a Button in a Table?

K

kvnsmnsn

I have a table with five columns, and the fifth column is filled with
sixteen buttons. Some are narrower than others, and the default ap-
pears to be to left justify them, which looks kind of bad to me. Is
there a way to center the buttons in that column? If so, how? Any
feedback would be appreciated.

---Kevin Simonson

"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
 
J

Jukka K. Korpela

Scripsit (e-mail address removed):
I have a table with five columns, and the fifth column is filled with
sixteen buttons.

This calls for a redesign, not visual tuning. What's the point in having
_five_ columns, and what's the point in _sixteen_ buttons in the fifth
column? In most cases, more than one button in a form is too much (not
counting radio buttons, of course). As usual, a URL would make it possible
to suggest a constructive approach.
Some are narrower than others, and the default ap-
pears to be to left justify them, which looks kind of bad to me.

So what? How often do _you_ use those buttons?
Is there a way to center the buttons in that column?

What? Better way than _what_? You didn't mention _centering_ before this at
all. And do you mean centering the set of buttons as a whole, or the text in
each button? As usual, a URL would let us see what you regard as a problem.
 
B

Ben C

I have a table with five columns, and the fifth column is filled with
sixteen buttons. Some are narrower than others, and the default ap-
pears to be to left justify them, which looks kind of bad to me. Is
there a way to center the buttons in that column? If so, how? Any
feedback would be appreciated.

Just text-align:center on the <td>. If it doesn't work, post a URL to a
test page.
 
B

Ben C

Scripsit (e-mail address removed):


This calls for a redesign, not visual tuning. What's the point in having
_five_ columns, and what's the point in _sixteen_ buttons in the fifth
column?
In most cases, more than one button in a form is too much (not
counting radio buttons, of course). As usual, a URL would make it possible
to suggest a constructive approach.

It sounds from the OP's recent posts that he's making a sort of
scientific calculator with a "pi" and arrow buttons. He may need more
than one button.
 
J

Jukka K. Korpela

Scripsit Ben C:
It sounds from the OP's recent posts that he's making a sort of
scientific calculator with a "pi" and arrow buttons. He may need more
than one button.

Yes, I gathered that from another question from the same poster. Several
buttons, probably JavaScript-driven, would make sense in a special
application for limited modes of use, but 16 buttons in a _row_ still sounds
odd (even though putting e.g. buttons for hexadecimal digits in a row rather
than in a square would admittedly be more _logical_).

I still have no idea of what centering refers to - centering a row of
buttons inside some cell that is for some odd reason wider than needed for
the buttons, or centering the text inside each button?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top