my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes centering buttons in Firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "centering buttons in Firefox" Watch "centering buttons in Firefox" New topic

centering buttons in Firefox

Manon Baratt
Ranch Hand

Joined: Jan 30, 2006
Posts: 58

I have two buttons that display correctly in the center of the row in IE but not in firefox. Here is the code.

<table align="center" cellpadding="2" cellspacing="2">
<td><input type="SUBMIT" value="Next"></td>
<td><input type="RESET" value="Clear Form"></td>

What do I need to do to have firefox do the same?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

Have you tried putting the align attribute on the table cells rather than the table? Or use CSS instead of markup?

[Asking smart questions] [About Bear] [Books by Bear]
Manon Baratt
Ranch Hand

Joined: Jan 30, 2006
Posts: 58
Yes, I tried putting the align on the individual cell and that did not work. How do I do that in css?

I agree. Here's the link:
subject: centering buttons in Firefox
It's not a secret anymore!