I am utilizing a service that provides me with dynamic HTML containing labels and inputs as shown below:
input:after {
content: "\a";
white-space: pre;
}
<label for="username">Username</label>
<input type="text" id="username" name="username" />
<label for="country">Country</label>
<input type="text" id="country" name="country" />
I wish to format the form in this manner:
However, my attempts have been unsuccessful. The dynamic nature of the HTML provided by the service prevents me from enclosing the labels and inputs within a div.
Do you have any suggestions on how I can achieve this formatting using only CSS?