function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Money Care 7Money Care 7 

How to align the vf page

Hi Guys
I have created a Vf page like
<b>Start Date</b><apex:inputField value="{!j.From_Date__c}"  />&nbsp;&nbsp;&nbsp;
     <b>End Date</b><apex:inputField value="{!j.To_Date__c}" />
     <apex:commandButton value="Go" action="{!displaingTable}" style="background:green"/>
      <b><apex:commandLink id="printable"  onclick="JavaScript:window.print();" value="Print"/></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
User-added image

but i am making mandatory the date field using required="true"
<b>Start Date</b><apex:inputField value="{!j.From_Date__c}"  required="true"/>&nbsp;&nbsp;&nbsp;
     <b>End Date</b><apex:inputField value="{!j.To_Date__c}" required="true"/>
     <apex:commandButton value="Go" action="{!displaingTable}" style="background:green"/>
      <b><apex:commandLink id="printable"  onclick="JavaScript:window.print();" value="Print"/></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
User-added image

so how to arrange the field in same line when i am using required field...
 
Tarun SuriTarun Suri
Hi Money Care 7

U can Put this whole code in HTML Table like this
<table>
	<tr>
		 <td><b>Start Date</b><apex:inputField value="{!j.From_Date__c}"  required="true"/></td>
		 <td><b>End Date</b><apex:inputField value="{!j.To_Date__c}" required="true"/></td>
		 <td><apex:commandButton value="Go" action="{!displaingTable}" style="background:green"/></td>
		 <td><b><apex:commandLink id="printable"  onclick="JavaScript:window.print();" value="Print"/></b></td> 
	  </tr>
</table>

Ask me if You still have Problem or Please Mark as Best answer if it solves Your Problem
Thanks
Tarun Suri
 
NagendraNagendra (Salesforce Developers) 
Hi Money Care 7,

Please refer to the below post for similar kind of issue.
https://developer.salesforce.com/forums/?id=906F0000000984FIAQ
http://salesforce.stackexchange.com/questions/94970/how-to-align-selectlist-in-vf-page

Please let me know if this helps you.

Best Regards,
Nagendra.P