Solved

button to the right

Posted on 2014-03-31
3
389 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LAMP problem identifier tool ? 9 131
throw exception 21 78
Convert Silverlight ERP To Angularjs,HTML5 3 107
Drop down list show all elements but disabled for selection 6 60
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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

734 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