Solved

Top Alignment in Bootstrap Form

Posted on 2016-09-03
6
46 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 51

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 51

Expert Comment

by:Julian Hansen
ID: 41783032
You are welcome.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 51

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 51

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now