Current location: Hot Scripts Forums » General Web Coding » CSS » how to align to text input type using css


how to align to text input type using css

Reply
  #1 (permalink)  
Old 04-13-09, 12:37 AM
deepbluegene's Avatar
deepbluegene deepbluegene is offline
Newbie Coder
 
Join Date: Jan 2009
Location: Australia
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
how to align to text input type using css

Hi
i am using a form in my page's right sidebar where user has to enter username and password. how i can align them using css. i have done that before but have forgot how i did that time. very stupid of me .

please help
Reply With Quote
  #2 (permalink)  
Old 04-13-09, 05:19 AM
RichyRich38's Avatar
RichyRich38 RichyRich38 is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 78
Thanks: 2
Thanked 0 Times in 0 Posts
Hi do you have some code we can see???
Reply With Quote
  #3 (permalink)  
Old 04-14-09, 06:18 PM
dgreenhouse's Avatar
dgreenhouse dgreenhouse is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: San Francisco
Posts: 457
Thanks: 0
Thanked 3 Times in 3 Posts
Hate to tell you, but tables are back in... :-)

Probably float a div with a 2 column by 3 row table inside of it.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title> Float a div right </title>
    <style>
      #authenticate {
        float: right;
      }
    </style>
  </head>
  <body>
    <div id="authenticate">
      <form method="post" action="login.php" >
        <table border="0">
          <tr><td>User Name</td><td><input type="text" name="user"></td></tr>
          <tr><td>Password</td><td><input type="password" name="password"</td></tr>
          <tr><td>&nbsp;</td><td><input type="submit" value="Login"></td></tr>
        </table>
      </form>
    </div>
  </body>
</html>

Last edited by dgreenhouse; 04-14-09 at 06:23 PM.
Reply With Quote
  #4 (permalink)  
Old 04-16-09, 11:57 PM
deepbluegene's Avatar
deepbluegene deepbluegene is offline
Newbie Coder
 
Join Date: Jan 2009
Location: Australia
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry folks. i dropped the idea of aligning for the moment.but thanks for your help.sorry for late reply.
thanks
Reply With Quote
  #5 (permalink)  
Old 04-18-09, 12:19 PM
fleep fleep is offline
Newbie Coder
 
Join Date: Jul 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dgreenhouse View Post
Hate to tell you, but tables are back in... :-)
Really? What for?
Reply With Quote
  #6 (permalink)  
Old 04-20-09, 07:39 AM
dgreenhouse's Avatar
dgreenhouse dgreenhouse is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: San Francisco
Posts: 457
Thanks: 0
Thanked 3 Times in 3 Posts
It was kind of a joke... But not totally...

... People pulling their hair out and spending oodles of hours trying to get CSS to
line up cross browser. I've met a lot of designers who've given up and gone
back to tables in a number of cases. Can't blame them...

Quote:
Originally Posted by fleep View Post
Really? What for?

Last edited by dgreenhouse; 04-20-09 at 07:52 AM.
Reply With Quote
  #7 (permalink)  
Old 04-27-09, 12:31 AM
harish harish is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Hope this code will help you...

Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Design 4</title>
</head>
<style>
.note{
    font-family:tahoma;
    font-size:10px;
    color:#333333;
}
.input{
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-weight:normal;
    font-size:12px;
    border:1px #6a6a6a solid;
}
.text{
    font-family:tahoma;
    font-size:11px;
    font-weight:bold;
    color:#6a6a6a;
    background-color:#EAEAEA;
}
.btn{
    font-weight:bold;
}

</style>
<body>
<table width="550px">
    <tr>
        <td>
<table border="0" cellpadding="2" width="100%" cellspacing="0">
                <tr>
                    <td colspan="3" style="border-bottom:1px #666666 solid; font-family:tahoma; font-weight:bold; color:#666666; font-size:14px">
                        Already registered? Login Here                  </td>
                </tr>
                <tr height="10px">
<td class="text">&nbsp;</td>               
                    <td style="border-left:1px #666666 solid; font-size:1px" rowspan="6">&nbsp;</td>
                    <td style="font-size:1px;">&nbsp;</td>
                </tr>
                <tr>
                    <td class="text" align="right"><span style="color:#FF0000">*</span> Email</td>             
                    <td><input size="35" maxlength="50" class="input" type="text"></td>
                </tr>
                <tr>
                    <td align="right" width="32%" class="text"><span style="color:#FF0000">*</span>Password</td>
                    <td width="68%"><input size="35" maxlength="50" class="input" type="text"></td>
                </tr>
                <tr>
                   <td align="right" class="text">&nbsp;</td>
                   <td style="font-size:14px"><input type="checkbox" /> Save my email and password</td>
                </tr>        
                <tr>
                    <td class="text">&nbsp;</td>
                    <td>
                        <input value="Continue &gt;&gt;" class="btn" type="submit">&nbsp;&nbsp;
                        <input value="Reset" class="btn" type="reset">&nbsp;&nbsp;&nbsp;                   </td>
                </tr>
                <tr>
                    <td class="text">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="3" style="border-top:1px #666666 solid;font-size:1px;">&nbsp;</td>
                </tr>
            </table>
            <br />
            <table border="0" cellpadding="2" width="100%" cellspacing="0">
                <tr>
                    <td colspan="3" style="border-bottom:1px #666666 solid; font-family:tahoma; font-weight:bold; color:#666666; font-size:14px">
                        Create Account - Register
                    </td>
                </tr>
                <tr height="10px">
                    <td class="text">&nbsp;</td>               
                    <td style="border-left:1px #666666 solid; font-size:1px" rowspan="13">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" width="32%" class="text"><span style="color:#FF0000">*</span>Your Name</td>
                    <td width="68%"><input size="35" maxlength="50" class="input" type="text"></td>
                </tr>
                <tr>
                   <td align="right" class="text"><span style="color:#FF0000">*</span>E-Mail ID</td>
                   <td><input size="50" maxlength="50" class="input" type="text"></td>
                </tr>
                <tr>
                   <td align="right" class="text">Alternate E-Mail ID</td>
                   <td><input size="50" maxlength="50" class="input" type="text"></td>
                </tr>        
                <tr>
                   <td align="right" class="text" valign="bottom">Your Phone</td>
                   <td>
                        <span>
                            <small class="note">Country Code&nbsp;-&nbsp;City Code&nbsp;&nbsp;-&nbsp;&nbsp;Phone Number</small>
                        </span><br>
                            <input size="6" class="input" type="text">&nbsp;-&nbsp;
                            <input size="4" class="input" type="text">&nbsp;-&nbsp;
                            <input size="23" class="input" type="text">
                  </td>
                </tr>
                <tr>
                    <td align="right" class="text">Mobile Phone </td>
                    <td><input size="35" class="input" type="text"></td>
                </tr>
               
                <tr>
                    <td align="right" class="text"><span style="color:#FF0000">*</span>Your Postal Address</td>
                    <td><textarea cols="37" rows="3" class="input"></textarea></td>
                </tr>
                <tr>
                    <td align="right" class="text"><span style="color:#FF0000">*</span>Country </td>
                   
                    <td>
                    <select class="input">
                     <option value="x" selected="selected">--------------- Select One --------------</option>
                    </select>
                  </td>
                </tr>
               
                <tr>
                    <td align="right" class="text"><span style="color:#FF0000">*</span>Password</td>
                    <td><input size="25" class="input" type="password"></td>
                </tr>

                <tr>
                    <td align="right" class="text"><span style="color:#FF0000">*</span>Re - Enter Password</td>
                    <td><input size="25" class="input" type="password"></td>
                </tr>

                <tr>
                    <td class="text"></td>
                    <td><input value="1" type="checkbox">&nbsp;&nbsp;<b>I accept the <a href="#">Terms of Use</a></b></td>
                </tr>
                <tr>
                    <td class="text"></td>
                    <td height="30">
                        <input value="Continue &gt;&gt;" class="btn" type="submit">&nbsp;&nbsp;
                        <input value="Reset" class="btn" type="reset">&nbsp;&nbsp;&nbsp;
                   </td>
                </tr>
                <tr>
                    <td class="text">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="3" style="border-top:1px #666666 solid;font-size:1px;">&nbsp;</td>
                </tr>
               
            </table>
        </td>
    </tr>
</table>
</body>
</html>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
text box with scroll bar silvermane CSS 7 01-16-09 03:03 AM
div css theighost CSS 11 09-14-08 02:30 AM
Draggable Tables Ares JavaScript 10 08-03-06 06:55 AM
Need Your HelP! Loading Multiple External Text into Multiple Dynamic Text Fields Flash_Boi Flash & ActionScript 2 03-30-06 03:27 PM
picking random entries with a filter... Double selection problem dsumpter PHP 7 11-16-03 07:19 PM


All times are GMT -5. The time now is 02:18 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.