0

I am new on VF page. So I have created a simple css method in my vf page like:

<head>
    <style type="text/css">
        tdstyleform {
            text-align: center;
            font-size: 16px;
        }
    </style>
</head>

And using it like:

<td class="tdstyleform">
    <b>COMPLAINT FORM</b>
</td>

This gives a Code quality error stating "Selectors should be known". If I don't create the css method and use it directly inside the td class, i still get a code quality issue. Can anyone please help what can be done here?

1 Answer 1

0

It looks like you're missing the "." before the class name in the CSS code. The "." is used to specify that you're defining a class in CSS.

<head>
    <style type="text/css">
        .tdstyleform {
            text-align: center;
            font-size: 16px;
        }
    </style>
</head>

<td class="tdstyleform">
    <b>COMPLAINT FORM</b>
</td>

With this change, the CSS code should be correctly associated with the class tdstyleform.

3
  • Let me quickly try that! Feb 13, 2023 at 7:16
  • did it worked ?
    – Aman Patil
    Feb 13, 2023 at 7:48
  • Yes it did. Thanks! :) Feb 13, 2023 at 13:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .