File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63858

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!