Forum Moderators: not2easy
What I'm looking for is the border design. I want it like this:
product (border) product (border) product
There should be no border in the beginning and in the end. If I knew what box would be the last, I could just:
border-right: none;
But the floating design makes it impossible to decide what box will be the last.
Any ideas how to solve this?
[edited by: jatar_k at 6:20 pm (utc) on April 12, 2007]
[edit reason] no urls thanks [/edit]
Needs to be done in JavaScript, as that is the only way to get screen size.
However, you could fool it by not using borders, having a small margin between product shots, and a background color. That would give you the illusion of borders, and the edges would look OK.
By the way, you shouldn't have a link like that. It violates TOS. I found this out a number of times when I started posting here. They are very strict about it. Don't get upset when they remove it.
We do have a JavaScript and AJAX Forum [webmasterworld.com]. You might try asking there.
Basically, what you want is a script that goes through the rendered <div> elements, and assigns the appropriate classes to them. I have seen it done a number of times.
and the "product boxes" will have fixed size.
if the boxes are the same the same size could you simply make a background graphic with a repeating vertical stripe wide enough to match the boxes fixed width (+ a bit for margins) and put it as a background on a container for these boxes?
For example:
Category contains 8 products.
Boxes are 200px wide.
- A visitor with resolution 800x600px. The boxes will line up like this:
box ¦ box ¦ box ¦ box
box ¦ box ¦ box ¦ box
- Another visitor with 1240 resolution:
box ¦ box ¦ box ¦ box ¦ box ¦ box
box ¦ box