Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Center slides when widen browser Reply To: [Solved] Center slides when widen browser

#206767
Marie Mosley
Participant

First thing I’d recommend is checking out the slider plugin settings to see if there are any built-in options for centering.

If not, it looks like margin: 0 auto; will do the trick since your slider has its width defined in its inline styles.

The zoominoutParent div the slideshow is inside has a series of numbers at the end that change on each page load, so you’d need an attribute selector to target it reliably:

div[id^='zoominoutParent'] {
  margin: 0 auto;
}

That selector selects the div whose id starts with zoominoutParent.

BTW, this is a good post to reference when centering issues creep up, it really covers it all: https://css-tricks.com/centering-css-complete-guide/