Solved

Top Alignment in Bootstrap Form

Posted on 2016-09-03
6
55 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 54

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 54

Expert Comment

by:Julian Hansen
ID: 41783032
You are welcome.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 54

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 54

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Not showing page correctly 3 40
Centered Image 2 27
How can I make the input automatically take the width of the column? 1 17
Change Background Color of Website 5 17
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

770 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