You can freely use any content in your overlays. Here you can see a couple of examples. Open the source of this page to see the code. You should define the with of the overlay explicitly. The overlay class will try to guess the width, but it might fail.