Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Display buttons in the same line

Display buttons in the same line


I have a web application in which i have these two Submit button inside a table


I'd like that it be displayed in the same line but i have this result:


Why this happens? how can i fix my code to show the buttons in the same line?

Problem Courtesy of: Lamloumi Afif


I'd stay away from this method of css personally, just my preference this will mean that every submit button is exactly the same but what if you don't want this styling with every submit button. But then again that method is much better than doing css inside a HTML file



You're better off giving the submit buttons a class called submit then you can pick and choose which submits you want to do you're styling for

float: left;

The main problem is your table column widths perhaps give them all a class and give them a width and/or height that meets your needs inside an external css file.

Solution courtesy of: Crouch


View additional discussion.

This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Display buttons in the same line


Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription