?
Solved

button to the right

Posted on 2014-03-31
3
Medium Priority
?
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
Tej Pratap Shukla ~Dexter earned 800 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 12

Assisted Solution

by:Tej Pratap Shukla ~Dexter
Tej Pratap Shukla ~Dexter earned 800 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This video teaches users how to migrate an existing Wordpress website to a new domain.
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.

762 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