Align label and input vertically
On an html form we usually have the following layout:
[Label][Input_TextBox]
or
[Input_CheckBox][Label]
By default a label can be a bit higher than the text box. The solution is to apply this CSS to both the elements:
.inputOrLabel {
display:inline-block;
vertical-align:middle;
}
Vertical alignment of blocks is difficult in other cases. See this article for more details.
No comments yet.
-
Recent
- OpenGL hardware acceleration through remote X11 SSH connection
- GDB: How do I set current source file for list and break commands
- How To Create and Seed a Torrent (Ubuntu server, Transmission)
- GIT TF: Undo shallow pull and pull squashed changeset
- Lynx on Windows 7 and lynx_bookmarks.html file problem
- Old MacBook Overheating and Installation of Mac OS 10.4 on New Hard Drives
- Memory Alignment Of Structures and Classes in C++
- Align label and input vertically
- Google Test Framework and Visual Studio 2010
- Convex Hull
- Run a bash script with sudo, nohup and in the background
- Contact database with web interface – EVPO Members
-
Links
-
Archives
- March 2017 (1)
- May 2015 (1)
- January 2015 (1)
- November 2014 (1)
- October 2014 (1)
- March 2014 (1)
- January 2014 (1)
- June 2013 (1)
- May 2013 (2)
- February 2012 (2)
- October 2010 (1)
- February 2010 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS
Leave a Reply