css woes..
- Started
- Last post
- 6 Responses
- milo
This maybe tricky...
got a simple 5x5 grid gallery with all my images float:left; padding-right:15px within a container - the trouble is that on the fifth one of each row I'd like to kill the padding-right value..? i'm pulling them all in from mysql with php. So i could potentially use php as well as css.Any help would be gratefully received : )
- gabriel20
just create a counter with PHP that puts a lastitem class that has no padding on every 5th item.
- milo0
cheers, I shall give that a try..
Ideally i wouldn't mind doing it with css though?
- hiten0
couldnt you make a container a certain amount of pixels wide so that 5 ft then make the rest wrap...
like how text wraps inside a div or something?
wouldnt that work?
- heavyt0
2 ways to do it:
1 - add 15px to your container for the thumbs2- i think that you could change it to left padding and then use a -15px left margin on the thumbs container.
BUT, i would just use PHP to run a modulo (%) to count the fifth and change a class, or write an inline style.
- milo0
sorted! thanks for the help.
went for php in the end to swap the class.
- hiten0
send me the script .... :S