0

is it possible to resize the font size based on the screen width, so that i always see the full text without having to scroll to the right, even on a mobile phone? I need to use this CSS on a visualforce page in salesforce. So i need the text to not wrap based on the screen, but always keep the same ratio.

<apex:page standardController="Account" showHeader="false" sidebar="false" standardStylesheets="false" >
<apex:slds />
<style>
    // css goes here
</style>
<apex:outputField value="{!Account.Field__c}"/>
</apex:page>
Brian23Gt
  • 1
  • 1

1 Answers1

0

This worked for me :

<apex:page standardController="Account" showHeader="false" sidebar="false" standardStylesheets="false" >

<apex:slds />
<style>
.parent {
width: 100%;
height: auto;
min-height: 100px;
font-size: 1.3vw;
display: inline;
}
</style>
<div class="parent">
<apex:outputField value="{!Account.Field__c}"/>
</div>
</apex:page>
Brian23Gt
  • 1
  • 1