Contents
Is it possible to place a Button next to a TextBox when the Button has a given width (throug it’s value) and the Parent div also have a given width. In the end the TextBox width + Button width should be the width of the parent div.
How to use Lightning Design System in Visualforce?
To use Lightning Design System style sheets in your Visualforce page:
- Add anywhere in your page markup.
- Set the applyBodyTag or applyHtmlTag attribute to false .
- Include the slds-scope class on any SLDS style or asset parent element.
How do I right align a button?
If you want to move the button to the right, you can also place the button within a element and add the text-align property with its “right” value to the “align-right” class of the .
If the input boxes are of fixed width, as in your case, then there is no need of child div’s which I used above. You can just add left: 100px; /* width of the input text */ to the submit button. Put them into a container, set fix width and height of the container. And set the elements in the container only percentage width.
As you can see below I am trying to get an input field and then to its right the submit button. However for some reason I can’t get them to align correctly on any browser, nor can I get them to at least look the same in them and finally everything goes bad when I zoom as well!
How to align Lightning component label and fields?
It’s never hard to make the input field and the label appear in 1 line where the input box has similar alignment with the input box below it. But using the lightning:input with the label together in it, would it be possible to align them in 1 row? Yes, simply place your elements in a horizontal form, and give the elements the correct size.