Posts Tagged ‘style’

Marking Up and Styling an Image Gallery

Tuesday, March 25th, 2008

While working on a new site (Rolling Horde), I decided to include a small image gallery. I randomly display four images from a flickr album in the sidebar.

The pictures are presented in the mark-up that flickr creates, and I used the styling that came with the template I was working from. It creates a simple two by two square of photos, with a slight gap in between them.

Although I like the way they are presented, I’m not sure I like the mark-up that flickr creates. What would be the simplest, semantic way to mark-up and style images in a small album like this?
(more…)

How to Alternate CSS Styles Using PHP

Wednesday, February 13th, 2008

There are a lot of situations in which you’d like to alternate CSS styles from one element to the next. Long tables, for example, look a lot nicer when the background color of the rows is alternated.

How do we do that? Some pretty simple PHP can help you accomplish this task and spice up your HTML/CSS.
(more…)