fabiorino / crelly-slider

A free responsive slider for WordPress that supports layers. Add texts, images, videos and beautify them with transitions and animations.
MIT License
104 stars 36 forks source link

Text elements not centering inside the sliders #42

Open randzgonz02 opened 7 years ago

randzgonz02 commented 7 years ago

First of all, here is the screenshot: http://prntscr.com/ffr1jc

The image element seems calculated correctly to be centered. But the text elements seem computed from Starts Width and not from the Screen Width/Size. For instance, I have set the starts_width value to 1440px but at the same time, I have chosen the Layout value to Full Width which is my site requirement.

My question is, how would I center those text elements that will use the Full-Width value(which is greater from the starts-width value I set) for some plugin computations instead of the Starts-Width value?

I hope you get what I'm trying to say..

Thank you!, Randy 5722df2a6f4842279a805a87f5c73733

fabiorino commented 7 years ago

Hello. They are calculated using the start width and the start height, but all the values are automatically scaled according to the user's screen resolution (the math is done in the frontend).

What font sizes are you using? If you're using the default font size, try to set another font size, save, refresh, and then revert back to the default one.

randzgonz02 commented 7 years ago

It seems that adding an imported font resulted this issue. And when I add the custom css for the font style the preview screen seems not viewing the exact look of the font which seems the cause of miscalculation.

May I know if there's any way to resolve this? Or maybe a way that we can import the font file then we can have the option to select that specific font inside the text element editor(font-name dropdown)?

Thanks @fabiorino!

fabiorino commented 7 years ago

If the font has been imported using wp_enqueue_style, the font will work in the frontend only. You could try to use admin_enqueue_scripts. Then, manually set the font-family in the CSS text area.

randzgonz02 commented 7 years ago

Thanks @fabiorino! It works now! :)