1

I got this:

enter image description here

As you see I already aligned label and input field inline with CSS, because they are both inside same container, but the button is outside. I was wondering if I could somehow move the button inside the container? So then I could format all elements into one line.

  • Try giving container-inline class to the parent element (form itself or better create a field set to include text input and submit buttons). If I can recall well, that is how core is doing that. – AyeshK May 28 '14 at 8:12
  • This is a CSS question (i believe not allowed). There are multiple solutions. They are all inside form > div {} selector. You can make ḿ float, position the button absolute, give specific widths etc. – Marcel May 28 '14 at 8:12
0

That's typical in Drupal. In this very moment, This is the CSS styling I use in scenario similar to yours:

.some-div-class label,  .some-div-class input[type="text"] {
  display:inline;
  width:auto;
  font-size:0.8em;
}

This will work fine on mobile devices as well.

Please do note your own CSS may need a bit more work.

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