last day (14 days later) » 

9:36 AM
0
A: Form Alignment in bootstrap 3

Tasos K.In the first two div.row you the .form-group with .col-sm-6. If you change it to .col-sm-4 you will get the alignment you want. E.g.: <div class="col-xs-12 col-sm-4"> <div class="form-group"> <label for="txtProjectName" class="control-label col-sm-4 col-xs-3">Project Name</label> ...

 
What if I want to make "Project Name" input field span all row?
 
I updated my answer
 
Hi Tasos, I noticed one thing. Label with ".col-sm-1" when placed inside a column of ".col-sm-12", is different from a label with ".col-sm-1" placed inside a column of ".col-sm-4" as in the case of a single row and a row with 3 columns above. I had to give the labels in the row with 3 columns a ".col-sm-3" instead to fit the above labels. Any idea?
 
You cannot add a .col-sm-1 inside a .col-sm-4 directly. In order for the bootstrap grid to work properly you need to add a .row inside the .col-sm-4. Check documentation in nesting columns getbootstrap.com/css/#grid-nesting
 
Check this pls: jsfiddle.net/bhaidar/ws8e8nms Notice labels in row with one field and row with 3 fields.1st uses col-md-2 while others use col-md-6.As if within row of col-md-4,its divided into 12 columns by its turn. Also this problem reflects on buttons in the end,not getting aligned with rest of controls above. 10x
 
9:36 AM
Check this jsfiddle.net/ws8e8nms/2. To fix the buttons issue I wrapped the .form-group that contained the buttons into a .row and then a .col-xs-11.col-md-12 like you do with the rest of the form.
 
.form-group has the same effect of a .row? I mean I don't need a .row inside .form-group to use .col-*?
 
Yes, I believe so. Using .row is not necessary
 
Thanks Tasos a lot for your help. I hate CSS and that's why I moved to Bootstrap to help myself build some Forms. BTW, I noticed you are from Thessaloniki-Greece. I live in Greece too & I'm into ASP.NET etc. I was working for my company, who is based in Athens, 9 years in Lebanon, until I moved last July to Athens.
 
9:53 AM
Hello Bill, I am glad I helped. Yes, I agree CSS can be very difficult to handle sometimes and yes bootstrap has also saved me many hours
I have never lived in Athens, only visited for work. How do like Athens so far?
 
Athens is nice. Ive been coming to Athens since 2006 as business trips, but now I am permanent here. Are you into ASP.NET?
 
10:08 AM
Yes, for a good 6 years now. I was writing Webforms + VB.NET but in the last year I moved to a new project with MVC+C#. And a lot of JavaScript of course...
How about you?
 
10:31 AM
I have been an MVP in ASP.NET for 9 years and still. I am also a Microsoft Certified Trainer and also a book author (I have one book on amazon). During the past 10 years, my work was more project management, however, I kept following up on the technologies in the afternoons :) I enjoy MVC and looks like the MVC 6 is a huge change coming over.
 
Cool! Which is your book?
 
That's impressive! Do you have any thoughts publishing it again for newer technologies (e.g. .net 4.5)?
 
it took me 1 year to write it and the financial return wasn't that big. so most probably i won't be updating it unless publishing company asked me to do so.
I'm getting myself nowadays learning Greek :) I bought a nice book. I will be attending a course mid-October. Here the company is offering it for its employees.
 
10:49 AM
It was nice chatting with you Bilal, but I need to leave now. If you want to keep in touch I have my twitter and linkedin in my blog, codingstill.com
 
Sure thing. Take care.
 
Good luck with learning Greek, bye!
 

last day (14 days later) »