I am trying to align 2 inputs in 2 different td
tag to align horizontally. Moreover, when input
has been appended into td
, it will cover the td
text
There are 2 cases:
td
have text or empty, then everything is OK.td
has text, they do not align on same lineThis is my source code I have tried: https://jsfiddle.net/oc8Lgm3y/2/
you can add vertical-align:bottom;
to the td,th
.
You can check the source code here: https://jsfiddle.net/k1gapfmq/
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 50%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
vertical-align: bottom;
padding: 8px;
}
input[name=^='product'] {
background-color: red;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.