Topic: Center, damn you! |
|
---|---|
Author | Thread |
Obsessive-Compulsive (I) Inmate From: Guaynabo, PR |
posted 06-11-2004 07:38
Hey guys. As I've been learning about web standards etc, I've been in the process of converting my photo gallery application to XHTML 1.1/CSS2.1, and trying to get rid of all structural tables. I'm currently working on what I think is the most difficult page - the one that displays the thumbnails for a "roll". What I'm trying to do is float each thumbnail and its caption left so that I don't have a fixed number of thumbnails per row, but they can flow fluidly based on the width of the browser. That works, but I can't figure out how to get it centered in the browser. I've wrapped all of the thumbnail divs in a container div, but that div expands to fill its container (the main content div), rather than shrinking down to the size of however many thumbnails fit on a row. I imagine if I could get it to shrink down to that size, then centering it would be no big deal. But I'm new to this, so there may be a different approach that is better that I'm not aware of, so feel free to suggest any method which will result in the thumbnails being centered in the browser window Here is the static copy I'm working on: |
Maniac (V) Inmate From: Seoul, Korea |
posted 06-12-2004 04:44
I have to admit that I'm not 100% clear on what you're trying to do. This part in particular confuses me: quote:
|
Obsessive-Compulsive (I) Inmate From: Guaynabo, PR |
posted 06-12-2004 05:23
Sorry, I suppose that wasn't very clear. Yes, that link is almost exactly what I'm trying to do, except I'd like to have a caption underneath each image as well. I'll look at it and see if I can glean any usefil techniques from it. |
Obsessive-Compulsive (I) Inmate From: Guaynabo, PR |
posted 06-12-2004 05:42
BTW, this: |
Maniac (V) Inmate From: Seoul, Korea |
posted 06-12-2004 07:39
Ah, OK, I see what you're trying to do now... and I can see how that would be frustrating. It looks like it should be very simple, but I'm gathering it isn't. The reason my method works is because the thumbnails are centered--the containing div still expands to fill its parent element. You want them aligned to the left, yet you still want full rows to be centered, and you want it to be fluid.... |