Webbers Corner

Full Version: Alternating css
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

Is there a way to easily alernate the styling of something without having to rename every e.g. news item a different class. e.g. style1, style2, style1

thanks.

dave.
how do you mean?

you could use a style sheet rotator from php or javascript to open a different style sheet, and thus this would change the styling of something.
no.  i mean like on this forum homepage the background colour of each forum alternates down the page.

is the only way of doing this naming each different as you go down or is there some sort of easy way in css where you can set them the same number and it automatically alternates.

so when i have 15 blog posts, each alternates styling.

does that make sense?

i think you can't do it using css and need to use the php in the templating.
oh you can do it, gotta try and remember how, give me an hour or so.
Reference URL's