user1522451
user1522451

Reputation:

css margin in jquerymobile 1.3 button input

http://jsbin.com/olecad/3/edit

I am trying to move a input button by css margin-left:50%

but the button didn't move, the background moved.

Please help to guide me how to move a input button

Upvotes: 2

Views: 852

Answers (2)

Devang Rathod
Devang Rathod

Reputation: 6736

Try this CSS : add text-align:center in button3 css and remove margin-left:50% from input

#buttons_1{
  background:red;
}
#buttons_2{
  background:green;
}
#buttons_3{
  background:blue;
  text-align:center;
}
#input{
        margin-top:0px;
        background:red;
    }

Upvotes: 0

Dipesh Parmar
Dipesh Parmar

Reputation: 27382

Remove css from the input and add css for below.

.ui-btn-left, .ui-btn-right, .ui-input-clear, .ui-btn-inline, .ui-grid-a .ui-btn, .ui-grid-b .ui-btn, .ui-grid-c .ui-btn, .ui-grid-d .ui-btn, .ui-grid-e .ui-btn, .ui-grid-solo .ui-btn {
    margin-left: 20%;
    margin-right: 5px;
}

in jquery.mobile.css line number 2177.

Upvotes: 1

Related Questions