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 9 of 9
  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Form and Footer Help Needed

    I thought I would start a new thread instead of hijacking the other one. Apologies for all the threads today, hopefully these will stop!

    Quote Originally Posted by BAW View Post
    Right, you need to create your form, for example -

    ...

    [/CODE]

    Then u need a page that relates to the "thanks.php"

    that cotains this -
    Code:
    <script language="php">
    $email = $HTTP_POST_VARS[email];
    $mailto = "PUT UR EMAIL ADDY HERE!!";
    $mailsubj = "Form submission";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
    if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
    </script>

    Give that a shot!
    Thanks for that, I have just started HTML/CSS coding a couple of days ago so apologies for the stupid questions.

    With the thanks.php page, do I have to create that page similar to my template pages but with the javascript above incorporated somewhere? Or do I incorporate the above script within the Contact Form page?

    I would also like to align the left (e.g. First Name) and right (e.g. the text fields) sections.

    I am using the following code:

    Code:
    <form>
    <form action="thanks.php" method="post">
    <p>First Name: <input type="text" name="firstname" value=""/></p>
    <p>Last Name: <input type="text" name="lastname" value=""/></p>
    <p>Address: <textarea name="comments" rows="3" cols="30"></textarea></p>
    <p>Contact Telephone Number: <input type="text" name="telnumber" value=""/></p>
    <p>Message: <textarea name="comments" rows="7" cols="30"></textarea></p>
    <p><input type="submit" name="Submit" value="Send" /></p>
    <p><input type="reset" /></p>
    </form>
    However, the footer comes up above the form, please see the picture below. Can anyone help?



    My CSS code for the footer is:

    Code:
    #footer {
    font-size: 12px; 
    text-align: center; 
    background color: #ed1c24; 
    padding: 5px; 
    height: auto; 
    width: 100%;  
    visibility: visible; 
    z-index:10; 
    position: absolute;
    top: auto;
    bottom: 0px;
    }

  • #2
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    486
    Thanks
    10
    Thanked 33 Times in 32 Posts
    Can you give me the entire html page and css page? Its easier for me to see it that way and fix the problem.

  • #3
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I've been fiddling around with the coding and the problem still remains. Can anyone help? The problem seems to be the footer not staying at the bottom even though I have

    position: absolute;
    bottom: 0px;

    Can anyone help?

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by davm22 View Post
    I've been fiddling around with the coding and the problem still remains. Can anyone help? The problem seems to be the footer not staying at the bottom even though I have

    position: absolute;
    bottom: 0px;

    Can anyone help?
    Do you have a link to this page? If you're using divs with floats, did you clear your floats for the footer?

  • #5
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    Do you have a link to this page? If you're using divs with floats, did you clear your floats for the footer?
    Sorry I dont have a link to the page.

    I am not using any floats at all, should I be? Ill have to read up some more

  • #6
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by davm22 View Post
    Sorry I dont have a link to the page.

    I am not using any floats at all, should I be? Ill have to read up some more
    I thought you were. According to your other post, I thought I saw some divs with floats in your css. Yes floats are your friend...lol read up on how to use them and how to clear them so no floated elements resume normal document flow.

  • #7
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    I thought you were. According to your other post, I thought I saw some divs with floats in your css. Yes floats are your friend...lol read up on how to use them and how to clear them so no floated elements resume normal document flow.
    Had a quick look and float would only float things right or left so it wouldnt be ideal for this situation unless I am wrong?

    Every other page seems to be fine

    I have changed the coding and now it appears like the below. I want it so my red layer (#layer1) appears at the bottom. I thought about using bottom as auto but that didnt have the desired effect on other pages



    my coding for the red layer is:

    Code:
    #layer1 {
    position: absolute;
    left: 150px;
    right: 150px;
    margin-left: auto;
    margin-right; auto;
    top: 0px;
    bottom: 0px;
    z-index: 1;
    background-color: #ed1c24;
    border: 10px solid #ed1c24;
    }
    Code:
    #footer {
    font-size: 12px; 
    text-align: center; 
    background color: #ed1c24; 
    padding: 5px; 
    height: auto; 
    width: 100%; 
    border: 1 px solid #000; 
    visibility: visible; 
    z-index:10; 
    position: relative;
    top: auto;
    bottom: 0px;
    }

  • #8
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    The footer is now at the bottom of the site.

    However, the layer1 (the red background) isnt going all the way to the bottom.

    For this layer I have:

    Code:
    #layer1 {
    position: absolute;
    left: 150px;
    right: 150px;
    margin-left: auto;
    margin-right; auto;
    top: 0px;
    bottom:auto;
    z-index: 1;
    background-color: #ed1c24;
    border: 10px solid #ed1c24;
    padding-bottom:10px;
    }
    and

    Code:
    #layer1 {height: 100%}
    Last edited by davm22; 11-08-2010 at 10:34 PM.

  • #9
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Again, I would recommend downloading firebug to help you with debugging some of these issues you're having. Its free and is very useful for these kind of issues.


  •  

    Posting Permissions

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