My current CSS is specifically designed to format labels above form input elements, but I am facing an issue when trying to replace the inputs with text from a database for displaying read-only data.
Despite my efforts, changing the input fields to a span or asp:label does not result in the label rendering correctly above the text.
This is the CSS that I am using:
div.formRow {
padding: 2px 0px;
}
span.formItem {
display: inline-block;
position: relative;
padding: 0px 5px;
}
span.formItem label {
position: absolute;
left: 5px;
top: 0px;
}
span.formItem input, span.formItem select {
margin-top: 20px;
}