css3 - how to create connected buttons for form controls with bootstrap 3? -
I am trying to get a button on these form controls:
< P> To look like control in this example:
Actually I try to recreate the bootsnipp example by using Bootstrap3 [Bootstrap 3.1.1] form controls I am here.
Here's HTML:
& lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "control" & gt; & Lt; Div class = "entry form-group call-sm-4" & gt; & Lt; Div class = "input-group" & gt; & Lt; Input class = "form-control" name = "field []" type = "text" placeholder = "some type" & gt; & Lt; Button class = "BTN BTN-Success BTN-Aid" type = "button" & gt; & Lt; Span class = "glyphicon glyphicon-plus" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "entry form-group call-sm-4" & gt; & Lt; Div class = "input-group" & gt; & Lt; Input class = "form-control" name = "field []" type = "text" placeholder = "some type" & gt; & Lt; Button class = "BTN BTN-Success BTN-Aid" type = "button" & gt; & Lt; Span class = "glyphicon glyphicon-plus" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "entry form-group call-sm-4" & gt; & Lt; Div class = "input-group" & gt; & Lt; Input class = "form-control" name = "field []" type = "text" placeholder = "some type" & gt; & Lt; Button class = "BTN BTN-Success BTN-Aid" type = "button" & gt; & Lt; Span class = "glyphicon glyphicon-plus" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Div class = "tag-control" & gt; & Lt; Div class = "entry call-ssm-4 form-group" & gt; & Lt; Div class = "input-group" & gt; & Lt; Input class = "form-control" name = "tag []" type = "text" placeholder = "write something" /> & Lt; Div class = "input-group-btn" & gt; & Lt; Button class = "BTN BTN-Success BTN-Aid" type = "button" data-target = "tag-control" & gt; & Lt; Span class = "glyphicon glyphicon-plus" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;
Like the answer to Sean, which I had not tried I found that these solutions were broken when trying to change the column shape to a basic element.
You can press the button in the same period of class .input-group-btn
Wrap is required:
& lt; Input class = "form-control" name = "field []" type = "text" placeholder = "some type" & gt; & Lt; Span class = "input-group-btn" & gt; & Lt ;! - Do this - & gt; & Lt; Button class = "BTN BTN-Success BTN-Aid" type = "button" & gt; & Lt; Span class = "glyphicon glyphicon-plus" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Span & gt;
Demo:
Comments
Post a Comment