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 formatting page/placement of buttons 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 "formatting page/placement of buttons" Watch "formatting page/placement of buttons" New topic

formatting page/placement of buttons

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
i have tried a lot but with only limited success to arrange 4 buttons in one line across a page 2 button on the center and 2 right justified.

I tried <div align="center"> and align="right" tags, but the buttons on the right go to the next line. like this

I also tried <span style="float:right"> but I could not get the other 2 buttons to come to the center.Moreover i have <HR> after this and when i use span the rules moves up between 2 pair of buttons

Can someone help me with this formatting
Jai Parmar

Joined: Dec 02, 2005
Posts: 8
The best way to formatting it is to create a table and then positioning it in the way that you described such as .

| B1 | B2 | | B3 | B4 |

That should solve your problem.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Like CSS:

I agree. Here's the link:
subject: formatting page/placement of buttons
jQuery in Action, 3rd edition