Solved

Top Alignment in Bootstrap Form

Posted on 2016-09-03
6
62 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 56

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 56

Expert Comment

by:Julian Hansen
ID: 41783032
You are welcome.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 56

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 56

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create a table with buttons 3 33
2 separate CSS animations 2 32
How can I make a div layout like the one in the image 2 45
Top Aligning Inner Divs 5 23
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 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