Hi,

Quite simple really...

I'd like to make the form field (whether drop-down, text field, or whatever) to be in inline with the field title.

In other words, I want no line break between the the title of the field and the field itself.

The forms API creates the title by enclosing it in a label tag, so I'm thinking styling that tag may work, if that's possible. Or any other suggestions?

Thanks,

Shiraz

Comments

nevets’s picture

In your theme's style.css file add the rules

.node-form .form-text {
display:inline;
width:auto;
}

and

.form-item label {
display:inline;
}

These will override existing css rules and cover a number of cases. You can use firebug (a firefox extension) to add the needed rules for other cases. In general you are looking for input elements have display set to 'block' and adding a rule that sets that to 'inline'. In addition some rule may have width set in which case your rule will need to set width to auto (like in the case of .form-text)

shiraz dindar’s picture

that was very helpful. Thank you Nevets!