Solved

button to the right

Posted on 2014-03-31
3
388 Views
Last Modified: 2014-04-04
Hi,

I have a piece code but it is always displays to the left  and if i want to shift to the right how i can do

Thank you

<html>
<body>
 <FORM NAME="form1" METHOD="POST">
          <INPUT TYPE="BUTTON" VALUE="Button 1" ONCLICK="button1()">
            <INPUT TYPE="BUTTON" VALUE="Button 2" ONCLICK="button2()">
        </FORM>
</body>
</html>

Open in new window

0
Comment
Question by:roy_sanu
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Tej Pratap Shukla ~Dexter earned 200 total points
ID: 39968438
Hey there

Well always use css to define styling . In the code below i used inline css where i declared a class form1 and mentioned a style named float to right.

<html>
<head>
<style>
.form1
{
       float:right;}
</style>
</head>
<body>
 <FORM NAME="form1" METHOD="POST" class="form1">
          <INPUT TYPE="BUTTON" VALUE="Button 1" ONCLICK="button1()">
            <INPUT TYPE="BUTTON" VALUE="Button 2" ONCLICK="button2()">
        </FORM>
</body>
</html>


If you need to do further changes feel free to revert back
0
 

Author Comment

by:roy_sanu
ID: 39969713
Thank you again

One of my issue i have  three button.. I need to show,  let us say button1 to left ,button 2  and button 3  to the right corner...  How can this be done...
Do i need to use div  for  each button...
0
 
LVL 11

Assisted Solution

by:Tej Pratap Shukla ~Dexter
Tej Pratap Shukla ~Dexter earned 200 total points
ID: 39971249
Hey there

First of all there is absolutely no need to create separate divs.Simply just create two classes left align and right align .Inherit them to the buttons or the objects you want for example to left align button 1 call the left align class and vice-versa.Here's the code elaborating the concept further:

<html>
<head>
<style>
.ra
{
       float:right;}
       .la
       {
             float:left;}
</style>
</head>
<body>
 <FORM NAME="form1" METHOD="POST" class="form1">
          <INPUT TYPE="BUTTON" VALUE="Button 1" ONCLICK="button1()" class="la">
            <INPUT TYPE="BUTTON" VALUE="Button 2" ONCLICK="button2()" class="ra">
             <INPUT TYPE="BUTTON" VALUE="Button 2" ONCLICK="button2()" class="ra">
        </FORM>
</body>
</html>

Thanks
~Dex
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dropbox , office 365 and alternative solutions 8 92
Can't play streaming video on event.on24.com 7 353
Using YubiKey with REST API application 2 125
QQ problem 22 44
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question