dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Trying to float a submit button to the left...impossible task

  1. #1
    Join Date
    Oct 2011
    Posts
    11

    Trying to float a submit button to the left...impossible task

    Hi there I dont know what is wrong with this but I am trying to float a submit button to the left and I cant. I have tried for nearly 3 hours.

    This is the html:

    HTML Code:
    <input type="submit" name="Submit2" class="button" value="Send Email" />
    This is the css

    HTML Code:
    #contact_form .button {
    	margin-right: 300px;
    	overflow: hidden;
    	float: left;
    }
    .button {
    	float: left;
    }

  2. #2
    Join Date
    Jul 2009
    Posts
    184
    The first thing to do would be using Chrome's dev tools or Firebug(Firefox) to inspect the .button element, are those styles actually being applied to .button?

  3. #3
    Join Date
    Aug 2012
    Posts
    155
    To be able to help we need to see the rest of your form and related css for the form as by default the submit button would align to the left anyway so something is firstly affecting this alignment and secondly there may be something else in your code that is affecting your floating.

  4. #4
    Join Date
    Mar 2009
    Posts
    452
    you may try

    #contact_form .button {
    margin-right: 300px;
    overflow: hidden;
    float: left;
    }
    .button {
    float: left !important;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles