You need to sign in to do that
Don't have an account?
Kyle York 17
Why can't I get my text to align to the right on my VF page?
I need my "text" in this VF to align to the right but it stays to the left. Here is my code:
{!NOW()} is what I need to alighn to the right
<apex:page controller = "timeStamp_controller" > <table style="text-align:right;"> {!NOW()} </table> </apex:page>
{!NOW()} is what I need to alighn to the right
I have gone through your issue. First you need to add alignment to your <td> tag (the column) instead of the table.
Secondly, you must give your table some width so that it won't shrink to the size of your content.
Here, I have done it for you -
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
Please check below code:
<apex:page controller = "timeStamp_controller" >
<table Width="100%" style="text-align:right;">
<tr>
<td>
{!NOW()}
</td>
</tr>
</table>
</apex:page>
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com