Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7034497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:11:35+00:00 2026-05-28T01:11:35+00:00

I have a large number for forms with submit buttons and I need to

  • 0

I have a large number for forms with submit buttons and I need to right align the buttons. The problem is that when I use float: right, the submit element is taken out of the normal document flow. This means the form’s height is reduced and it’s bottom border then interferes with the button.

Here’s the code:

<html>
<head>
    <style type="text/css">
        #left-col {
            width: 290px;
        }
        #loginForm {
            border: 1px solid black;
        }   
        #submit {
            /* float: right; */
        }

    </style>
</head>
<body>
    <div id="left-col">
        <div id="loginForm">
            <form id="user-login-form" enctype="application/x-www-form-urlencoded" method="post" action="">
                <label for="email" class="required">Email</label>
                <input type="text" name="email" id="email" value="">
                <label for="password" class="required">Password</label>
                <input type="password" name="password" id="password" value="">
                <input type="submit" name="submit" id="submit" value="Login" class="submit">
            </form>
        </div>
    </div>
</body>
</html>

The forms are generated programatically (using Zend_Form) so I am hoping to avoid hacks that require additional elements (such as paragraphs with clear: both).

Hopefully this will be a simple question for a CSS guru!

Thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:11:36+00:00Added an answer on May 28, 2026 at 1:11 am

    You can use the CSS :after pseudoelement to clear the container, without adding any extra HTML markup.

    You would add something like this to your CSS:

    #loginForm:after {
        content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }
    

    Or to the form element, whichever you deem more appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large number of csv files that look like this below: xxxxxxxx
I have a large number of C# WCF services that are being called by
Question We have a large number of xml configuration files that we want merged
I have a form that submits a large number of inputs... <input type=hidden name=searchTag_happy
I have a windows forms application on which I need to use a for
I have an large ASP.Net web application that will have a large number of
I have a large number of files in a .tar.gz archive. Checking the file
I have a large number of 2D points and I want to quickly get
I have a large number of files in a ClearCase directory structure, and I
We have a large number of Window Mobile Devices (Symbol MC35 & MC70). I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.