html - How can I put my button in the center in Ruby on rails? -


i have button has link on left side of screen.

<div class="col-md-4" text-center> <%=  button_to("bay area time", { action: "index" , :timezone=>'west'}, class: "btn btn-primary")  %> </div> 

i want put button in center of box. should make modifications achieve this? how can center button, when i'm trying incorporate action, , variable inside hyper link? :)

you need put text-center inside class declaration. in code outside of quotes , have no effect. should want if area in trying center button indeed col-md-4 gridspace. assuming including bootstrap css code correctly bootstrap grid class.

<div class="col-md-4 text-center" >  <%=  button_to("bay area time", { action: "index" , :timezone=>'west'}, class: "btn btn-primary")  %> </div> 

Comments