I am creating a form in Drupal 6 using form API.

I need to put a textfield and a select next to each other. they are for entering something like 'www.domainname.com' . www. is fixed. domainname section is given from user in a textfield and .com section is chosen from select element by user.

So they should be in a line. but as I see I can put these two form elements in a line, they are in their div container.

Would you help me? Thank you.

1 Answer 1


This is a CSS issue. All you need to do is limiting the width of both elements and then float them to the left; this will make them inline. Be sure to wrap them both in a div with the "clearfix" class to clear the float.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.