Solved

Top Alignment in Bootstrap Form

Posted on 2016-09-03
6
60 Views
Last Modified: 2016-09-03
How can I get the labels and other form controls to align at the top of the form on this page?
0
Comment
Question by:Bob Schneider
  • 4
  • 2
6 Comments
 
LVL 55

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41783027
Try adding this style to your custom styles
.form-inline .form-control {
  vertical-align: top;
}

Open in new window

0
 

Author Comment

by:Bob Schneider
ID: 41783031
Perfect.  Thank you!
0
 
LVL 55

Expert Comment

by:Julian Hansen
ID: 41783032
You are welcome.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 55

Expert Comment

by:Julian Hansen
ID: 41783034
Just a note - that style will affect all your forms. You might want to restrict it only to the form at the top of the page. Give the form a class (say 'topform') and then prefix the above styles with that class

.topform .form-inline .form-control {
  vertical-align: top;
}

Open in new window

0
 

Author Comment

by:Bob Schneider
ID: 41783039
Thanks.  This particular page will  only have one form but I appreciate the heads up.
0
 
LVL 55

Expert Comment

by:Julian Hansen
ID: 41783043
No problem - it is good practice anyway, sites change and you forget things - can cause unnecessary loss of time tracking down side effects.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question