Soldato
- Joined
- 10 Apr 2006
- Posts
- 7,890
- Location
- North West
I need to output some data from a database, at the moment it is just 1 query that goes through everything and outputs them and styles them with CSS.
Everything that comes out is output into a div with an ID = package.
This div ID has a background-image set to Image_1.jpg
But what I need is the query to output 2 entries at a time into different divs so I can style them differently.
ie
Instead of everything being output to id=package, I need it to output to id=package then the next one to id=package2 then back to id=package etc.
Will upload a picture to show what I mean incase Im not clear!
pictures:
This one is how it looks at the moment, without the data in each DIV:
http://www.tomsinclair.co.uk/random/all_right.jpg
This is how I want it to look :
http://www.tomsinclair.co.uk/random/all_ok.jpg
is there a simple way or just outputting 2 entries in 1 query and within that I can style them differently?
Everything that comes out is output into a div with an ID = package.
This div ID has a background-image set to Image_1.jpg
But what I need is the query to output 2 entries at a time into different divs so I can style them differently.
ie
Instead of everything being output to id=package, I need it to output to id=package then the next one to id=package2 then back to id=package etc.
Will upload a picture to show what I mean incase Im not clear!

pictures:
This one is how it looks at the moment, without the data in each DIV:
http://www.tomsinclair.co.uk/random/all_right.jpg
This is how I want it to look :
http://www.tomsinclair.co.uk/random/all_ok.jpg
is there a simple way or just outputting 2 entries in 1 query and within that I can style them differently?
Last edited: