• Skip to primary navigation
  • Skip to main content
  • Skip to footer

JH Tech Services

A knowledgebase

  • Portfolio
  • Knowledgebase
  • About

Wooslider formats css different for a slider of only one slide

July 22, 2013 by jer0dh

Probably not many people would run across this but we wanted an certain area on the pages of a wordpress website to be either a slider or a picture. To keep it simple for the user, they either give the slider group a single picture or multiple (if they want the slide effect).

I found that wooslider automatically adds the width of the container it is as an inline style for the <li> tag.  If the slider group has only a single slide, then it does not for some reason..so the width becomes the width of the slide image.

My workaround was the following:

 

div.wooslider ul.slides li[style="display: list-item;"] {
	width: 100%;
}

Later I’m going to make the website more fluid by adding percentages for width’s. Since wooslider adds the width in pixels instead of 100%, I’m worried the slider will not be fluid. Still technically responsive, I guess.

  • CSS
  • Knowledgebase

Footer

  • Portfolio
  • Knowledgebase
  • About

© 2023