0

In a visualforce page, how can it be ensured that the placeholder text is smaller than the actual text size of the inputField? My code is as follows:

<apex:inputText value="{!subscriptionNumber}" styleClass="subscriptionNumberInput" id="subscriptionNumberInput" onmouseover="checkFindSubsFieldNotEmpty();" html-placeholder="This is 8 digits long and found on letters and emails we send you"/>

Thanks in advance!

1

You can use the ::placeholder pseduo-class:

<style>
.subscriptionNumberInput::placeholder {
  font-size: 50%;
}
</style>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.