css - Bootstrap 3 - align text to form-control items across grids -


What is the correct way to properly align the input and label in the grid in the bootstrap?

I would like to be labeled as the first Colonel: See my hypocrisy:

  & lt; Div class = "row" & gt; & Lt; Div class = "col-sm-6" style = "border-style: solid; border width: 1px;" & Gt; & Lt; Form class = "form-inline" role = "form" & gt; & Lt; Div class = "form-group" & gt; & Lt; Input type = "email" class = "form-control" id = "exampleInputEmail1" placeholder = "email" style = "width: 80px;" & Gt; & Lt; Label & gt; OK & lt; / Labels & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; Div class = "col-sm-6" style = "border-style: solid; border width: 1px;" & Gt; & Lt; Form class = "form-inline" role = "form" & gt; & Lt; Div class = "form-group" & gt; & Lt; Label & gt; NOK & lt; / Label & gt; How does it align with the text 'OK'? & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

plunker:

HTML :

  & lt; Div class = "row" & gt; & Lt; Div class = "col-sm-6" style = "border-style: solid; border width: 1px;" & Gt; & Lt; Form class = "form-inline" & gt; & Lt; Input type = "email" class = "form-control" id = "exampleInputEmail1" placeholder = "email" style = "width: 80px;" /> & Lt; Label = "exampleInputEmail1" & gt; OK & lt; / Label & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; Div class = "col-sm-6" style = "border-style: solid; border width: 1px;" & Gt; & Lt; P class = "form-control-static" & gt; & Lt; B & gt; Knock & lt; / B & gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -