In order to vertically align 2 elements inside an outputpanel, I initially used a margin-top of 3em. However, this method proved to be non-responsive, as shown in the following images:
https://i.sstatic.net/yMRXc.png
In mobile view:
https://i.sstatic.net/UllwV.jpgMy goal is to align the right button with the text vertically on all devices.
This is the code I am currently using:
<p:outputPanel class="ui-g">
<p:outputPanel class="ui-g-8">
<h:outputText value="My text will be here" styleClass="enunciadoProtocolo" /><br />
<h:outputText value="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
styleClass="subEnunciadoProtocolo" />
</p:outputPanel>
<p:outputPanel class="ui-g-4" style="text-align: center; margin-top: 3em;">
<p:commandButton update="messages" icon="fa fa-file-text" value="View pdf" />
</p:outputPanel>