Moving Text to the left is blocked by inline css

Moving Text to the left is blocked by inline css

by Steffen Riek -
Number of replies: 2

Hi everyone,

I am trying to create a custom certificate design and I have the problem that i can not move text more than 28px to the left using something like this:

certificate_print_text($pdf, $x-28, $y + 55, 'C', $fontserif, '', 20, get_string('certify', 'certificate'));

I looked at my certificate using the build in inspector in firefox and found that there is some inline css that positions the entire text 134px to the right using this:

left: 133.346px;

I want to change this, but can not find the file where this is coded in.

Thanks in advance for your help.

Average of ratings: -
In reply to Steffen Riek

Re: Moving Text to the left is blocked by inline css

by Alex Ferrer -

Hi Steffen,

Change 'C' for 'L' and then adds pixels that you need to $x

certificate_print_text($pdf, $x-28, $y + 55, 'C', $fontserif, '', 20, get_string('certify', 'certificate'));
certificate_print_text($pdf, $x, $y + 55, 'L', $fontserif, '', 20, get_string('certify', 'certificate'));


Regards.

In reply to Alex Ferrer

Re: Moving Text to the left is blocked by inline css

by Steffen Riek -

Thank you very much Alex.

Exactly what I was looking for.