Ok just as I figured. You can add a class to the div that you added here – printf( '<div><h3>Related Posts</h3 Then style it how you want it to appear in your css.
I’m unable to test that code you posted because it didn’t show up properly here in the forum…..some of it gets stripped out when added like regular text, plus it throws everything else on the thread off since there are extra divs and other code.
Here’s how to add code in the forums – When you post code make sure to highlight the code and press the “code” button above in your toolbar so it can show up separately from regular text inside it’s own space….makes it easier to read, and nothing gets stripped out. I went ahead and edited your comment so you can see how it will look once you use it.