+ Start a Discussion

change outputtext position on visualforce page

I need to move the text to right side by certain points on visualforce page:
<apex:outputText >At least one Reason is required</apex:outputText>
<apex:outputText >Use Ctrl+Click to select more than One Reason</apex:outputText> 
Ravi NarayananRavi Narayanan
you want to move the text alone inside apex:outputtext or the complete apex:outputtext component itself to right side
only the text.i tried this but not working
<apex:outputtext style="padding:9pts;">At least one Reason is required</apex:outputText>
Ravi NarayananRavi Narayanan
<apex:outputtext style="text-align:right;">

try this and mark as best answer if it solves ur problem
it doesn't do anything. can u please check again
Anvitha Akurathi 4Anvitha Akurathi 4
Hi, please try using "float:right" in the style or use "position: relative; left: 25%" based on how ever you wish to see the text in the page. You can change the % value to move it as you wish.
The following line of code brought my line of text into the center of the page.
<apex:outputText value="Trying style features" style="font-size:12px;font-weight:bold; position: relative; left: 50%;"></apex:outputText>

Hi Anvith ,

I tried the same as you described ,but its not working 

<apex:outputText  style="font-size:120px;font-weight:bold; position: relative; right: 50%" value="{!gstvalue}"> G.S.T: </apex:outputText><br/><br/>
        <apex:outputText style="font-size:12px;font-weight:bold; position: relative; right: 50%" value="{!sgstValue}"> S.G.S.T: </apex:outputText>

Can you please help me to solve the issue ?..