Page is a not externally linkable
swa66 - 5:20 pm on Feb 27, 2013 (gmt 0)
Ouch.
I'd not add background colors, margins or padding that differ from 0 to "*" : it applies to every individual element on your page. What I gave you was a reset: to remove what the browsers have on their own.
If you want to add margins to the page itself, you can add padding to html, add background to body etc.
Your images do not fix your box anymore:
- images a has a size of 150x250 but has 10px paddding: so the content area is only 130x230 (padding sits on the inside of the dimension you gave).
- the images that go inside is are 150x250 (so they overflow), and have a margin on them as well that's not going to help.
I think you really need to look at the box model before playing with margins and padding in CSS:
- training (rather basic): [w3.org...]
- the standard (rather advanced): [w3.org...]
As to using the technique: you should be able to use it in other galleries, but it means you have to truly understand how they work as well as how this works ...
You should be able to find ready made stuff if you google "CSS gallery".