DannyW86
DannyW86

Reputation: 201

Button positioning in a html form

Basically i have a form, two inputs for name and password and underneath i have the submit button.

For some reason no matter how i target the submit button i cant change the width of it or figure out how to center it!! Beginning to get very frustrated at this stage as i know its probably only something simple so if anyone can help me out here it would really be appreciated!

http://jsfiddle.net/DannyW86/3kywX/

Hope this link to the fiddle works

In the fiddle there are 2 buttons because i was trying to see if i could target the buttons different ways but im only going to use one in the end when i can figure this out!

Upvotes: 0

Views: 236

Answers (2)

Cole Garstin
Cole Garstin

Reputation: 388

  1. Add text-align: center to .login_container .feeder_bm_login
  2. Remove float:left from #feeder_bm_main input, #feeder_bm_main select
  3. The width:220px on #feeder_bm_main input, #feeder_bm_main select controls the width of your buttons

Upvotes: 1

Praveen Kumar Purushothaman
Praveen Kumar Purushothaman

Reputation: 167172

Just three things inside #feeder_bm_main input, #feeder_bm_main select:

#feeder_bm_main input, #feeder_bm_main select {
    margin: 5px auto;
    float: none;
    display: block;
}

Demo: http://jsfiddle.net/3kywX/1/

Upvotes: 1

Related Questions