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 7 of 7
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,673
    Thanks
    28
    Thanked 4 Times in 4 Posts

    Problem getting form elements aligned

    Hi

    Virtually all my elements line up nicely except for the first three
    which insist on having the input box before the descriptive text.

    The css that I am using appears to be identical to me and yet the first 3 elements are behaving differently


    Compare "Campaign Title:" and "Niche:"
    With "Subject:"

    This is the page:

    My site


    If anyone can see what I have done wrong, would really appreciate the input.


    Thanks


    .
    Last edited by jeddi; 01-24-2012 at 08:00 AM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    It appears to be fine to me, although, you do have a problem with your textareas on higher resolutions (they are not on a new line), but that can be easily sorted out if you put <p> tags around them

  • #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,673
    Thanks
    28
    Thanked 4 Times in 4 Posts
    So are you seeing something different from this ?


    This is FF 9.0.1







    This is IE







    This is Chrome




    Thanks



    .
    Last edited by jeddi; 01-24-2012 at 02:46 PM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #4
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Yes I am seeing something different (attachment)

    I am on a 1080p monitor.
    Attached Thumbnails Attached Thumbnails Problem getting form elements aligned-whatisee.png  

  • #5
    New Coder
    Join Date
    Sep 2009
    Posts
    73
    Thanks
    5
    Thanked 9 Times in 9 Posts

    Arrow

    Just an example of the FIRST field, you can adjust the others as needed to fix the problem: (Note: Only checked/fixed for Firefox, didnt check other browsers)

    in your HTML, find this:

    Code:
    <div class="art_title"><span>Campaign Title:<input class="data1" type="text" value="Your free two month dog training course" maxlength="40" size="66" name="x_title">
    </span>
    </div>

    Replace with this: (and same to others if you want them all fixed)
    Code:
    <div class="art_title">
    <span>Campaign Title:</span> <input type="text" style="margin-top:12px;" class="data1" name="x_title" size="66" maxlength="40" value="Your  free two month dog training course">
    </div>
    Changes the SPAN position to place text to the left and add's MARGIN to top of input element to align it on the horizontal centerline

  • #6
    Senior Coder
    Join Date
    May 2006
    Posts
    1,673
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Thanks very much

    Got those elements sorted out ( thanks again )

    Now I have been trying to get the dashed bordered div to be centered.

    It is centered now but in FF the dashed box does not go around the whole form like it is supposed to.

    If I add a float:left to the form_top class, then the dashed box will go around all of the form but of course then it is not centered.

    Here is my present form

    My Site

    Does anyone know how I resolve this ?

    Thanks.



    .
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello jeddi,
    Since your form elements are floated, you'll need to clear them before the container will enclose them.
    Like this -
    Code:
    .form_top {
        border-color: #C0C0C0;
        border-style: dashed;
        border-width: 2px;
        clear: left;
        margin: 20px auto;
        overflow: auto;
        padding: 10px 0 10px 20px;
        width: 80%;
    }
    See this explanation of how overflow: auto; clears your floats.

    The x scrollbar that adds at the bottom shows how your 80% width container doesn't really work with your pixel width content.
    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


  •  

    Posting Permissions

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