[SOLVED] How to center the slider

Permalink Browser Info Environment
Hi,

I tried to center the slider overlay on my page, through the properties but the slider disapeared each time.

How can I do that?

Thanks.

Type: Discussion
Status: New
Styves
View Replies:
jb1 replied on at Permalink Reply
jb1
The centering option available from the "design" menu uses the CSS tag "text-align" which is design for modifying the alignment of text. As the Slider Overlay is surrounded by a DIV tag, it is not affected by the "text-align" in the same way.

It is a bit strange that the whole slider simply disappears. I've been able to replicate this as well. The only way to center align a DIV tag is using the CSS tag "margin". But implementing this would be fiddly and prone to conflicts with site themes.

So the easiest workaround is to use the "layout" feature in the core of C5. Simply create 3 columns and 1 row. Place the Slider Overlay into the middle column and adjust the width on the left and right accordingly. Not an elegant solution, but it will work.

Hope this helps.

JB
Styves replied on at Permalink Reply
Styves
You're right. It seems for now that the only way to place the Slider Overlay centered is by using layout.

Thanks for this solution.
rich5 replied on at Permalink Reply
rich5
For my gallery I have a mixture of landscape and portrait pictures, I was hoping to align these centrally.I want to use a height constraint and allow the widths of the image to vary but still maintain central alignment. Am I right in thinking this will not be possible using the 3 column workaround, as all the images will still be aligned left in the central column?

thanks

RS
jb1 replied on at Permalink Reply
jb1
It would be quite fiddly to get a solution around that. Unfortunately HTML & CSS doesn't have any built-in support for vertically aligned elements. But there are a couple workarounds available:

1) Place the Slider Overlay inside a table cell and vertically align that; or
2) Apply a CSS hack to obtain vertical alignment (but you have to hard-code the height of the element/s into your stylesheet, so it's not very flexible. It's quite messy and easily breaks in an environment like C5 where the content can change so quickly.

Hope this helps.

JB
rich5 replied on at Permalink Reply
rich5
Thanks for the quick reply, I'll give the table a go and see what happens..

Thanks

RS

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.