This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 60798

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

[Asking smart questions] [Bear's FrontMan] [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
Similar Threads
Dynamic population of second list box based on selection of first
Problems with Frames in web page......
Storing the value of a radio button
How to display values in my form if I have two textboxes of same name...
Help me about html:select