I’m trying to float a few inputs next to each other with dots between them to simulate an IPv4 address; however, the span is floating in the middle. How can I fix this? All of the elements in this picture have float:left applied.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Inputs and spans are inline elements, you don’t need to float them at all.
Use CSS
position: relative;andtop:to align elements vertically.From a user’s perspective I find four separate input boxes for an IP-address rather unfriendly. It’s harder to type and copy/paste does not work, which is a big drawback.
From the application’s perspective there is not much to gain from separate input boxes.
I’d say, dump the idea and provide a single input field.