We help IT Professionals succeed at work.

CSS centre text in slider caption

regisit
regisit asked
on
DIV image
In the above markeup I'm trying to centre the text "Best dental care for your family" within the caption box that is 660x40. This is a SliderPro slider in a Wordpress site. But I can't get it centered - remains stubbornly left! I've added custom styles as per:

.advanced-slider { margin: 0 auto; }
.advanced-slider .caption .wrapper .content { margin: 0 auto; }

The 1st gets the slider as a whole to centre in the post. the 2nd has no effect. Essentially I'm trying to get the content div to centre in the wrapper div. Tried the same with just .advanced-slider.caption.wrapper but same result.

Any ideas?

[Yes, SliderPro should come with options to align text within the caption box, but it doesn't!]
Comment
Watch Question

LZ1
Top Expert 2011

Commented:
What CSS is getting applied to the span other than the inline??  
Commented:
I have in fact found an answer. The content div inherited a position:absolute. Chaning that to relative allowed the paragraph text-aling to take effect and the text centered.

Who said CSS was easy!
LZ1
Top Expert 2011

Commented:
Glad you got it!

Author

Commented:
Self-answered

Author

Commented:
Thanks for taking the time to repsond.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.