The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Centered Boxed-Grid within a fluid container?

First post to this forum Actually, my first post to any web-dev forum.

I've beaten my head against the wall with this one, and this is not the first time I've encountered it. I've just always given up on it before.

Problem:

I have a grid of images inside of DL lists. These float left of each other, thus always horizontally filling in the available space. The problem, is, the outling container resizes (fluid) with the browser window, so when the available space is not quite the right size to fit another image, all images are left-aligned.

Question:

How do I have all the images, as a whole, always centered? ...hmmm.

======

You may view these screenies (1265px x 909px) to show you what I am trying to explain (sorry, can't use actual links):

Hi and welcome to the forums
If you give .panel.imagery a fixed width and then just use margin: 0 auto; to center it.

I understand what you are saying. My main problem, though, is that I do not want .panel.imagery to be fixed-width. The whole site is a fluid width, using percentages, which works fantastically, except for that one centering issue.

The solution was actually much easier than I had thought, as is usually the case.

My entire site is fluid, and the image containers (DL) inside it's outside container (DIV .panel) were fixed.
So if I make the DLs fluid (@ 31%), they always fill the the extra space. The way the site is designed, they will never be more than three images across.

Not exactly centered, I know, but with a little left padding, it will be close enough for me