Hello,
Is there a way to create a grid-like form with CSS? Meaning, I would like the label and input fields to be equidistant from one another. It naturally happens if I use tables but is there a way to achieve the same effect with CSS?
Floating label elements to the left and floating input elements to the right does quite achieve the same effect. Can't find a relevant solution by googling, many thanks in advance.
ryy705
0
Junior Poster
Recommended Answers
Jump to PostHi ryy705,
You will have to use CSS to achieve what you want. A example would be;
#col {width:250px;float:left;margin:2px;} #row {width:100%; margin:2px}
And your html will be as follows:
<form action="ac_contact.php" method="post"> <div id="row"> <div id="col">Name:</div> <div id="col"> <input type="text" name="name" /> </div> …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.