I have got a container 800 pixels wide with the overflow set to hidden. Inside I've got the content set to be in columns of a fixed height and 400 pixels wide so that two are shown at a time.
I've got an onclick event to adjust the margins to the columns to move through the content two columns at a time.
Since I know the width and height of the columns, is there a way to calculate how many columns my content is likely to take up. I don't need an exact value. I'd like to do it with JavaScript. I'm willing to do it in jQuery only if it can't be done in JavaScript even if there is more coding required to JavaScipt. I'm willing to do in php as a last resort. I don't suppose I can use CSS but with some of the things you can do with that, I wouldn't be surprised it you could.
Can anyone help me. I can include some source but since it's such a simple idea, I didn't think it was needed.