Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts

    Textbox not aligning to the right.

    I have tried everything tp align a textbox.

    Here is what I am having trouble with.


    This is a picture of what I need


    ---

    Code:
    <span style="float: left;">
    Main News Message:
    </span>
    <textarea class="theform" name="mainnewsmessage" cols="40" rows="5">You may recognize the Poison Arrow pub and the aquanite from our Guaranteed Content polls. Everything in the Poison Arrow came from in-game suggestions and the forums. And thats not all: beware of aquanites...</textarea>
    
    <hr>
    and the css:
    Code:
    <style type="text/css">
    input.theform {
    border:solid 1px #675f39;
    padding:4px 2px;
    }
    textarea.theform {
    border:solid 1px #675f39;
    padding:4px 2px;
    align: right;
    }
    </style>
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello bucket,
    Have you tried floating it?
    Like this -
    Code:
    textarea.theform {
    border:solid 1px #675f39;
    padding:4px 2px;
    width: **px; /*need a width*/
    float: right;
    }
    You may need to addy clear:right; or left or both to that. You may also need overflow:auto; in the containing div to clear the floats it holds.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts
    I have and it totally messes everything up.

    Try it yourself.


    EDIT:

    I have finnaly made it work by adding

    Code:
    <style type="text/css">
    input.theform {
    border:solid 1px #675f39;
    padding:4px 2px;
    }
    textarea.theform1 {
    border:solid 1px #675f39;
    padding:4px 2px;
    margin-left:211px;
    } 
    </style>
    to it.
    Last edited by bucket; 11-07-2009 at 06:19 PM.
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •