Unless you use a percentage div to contain the thumbnails and then margin:0 auto; for the margins, I don't see any other way of doing it.
Btw, I had a rough time with IE7 yesterday using margin: 0 auto; on a pageWrapper div. It kept shifting my left side nav to the content area on a resize without refreshing it. The solution was to put a specific width instead of auto (in my case it was to replace it with 0. So be wary of that and test it. Sandra Clark ============= http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -----Original Message----- From: James Smith [mailto:[EMAIL PROTECTED] Sent: Friday, May 11, 2007 11:06 AM To: CF-Community Subject: RE: Centring stuff with CSS Won't work, a width of 20% would vary with screen res. If I set {width:96px; margin:0 auto;} It would work but only on that page. Different pages have different numbers of thumbnails so I need a method that doesn't rely on setting a fixed width. -----Original Message----- From: Sandra Clark [mailto:[EMAIL PROTECTED] Sent: 09 May 2007 17:19 To: CF-Community Subject: RE: Centring stuff with CSS Center the div by setting a width and then a margin of half. div#thumbs{width: 20%; margin-left: 40%;} Sandra Clark ============= http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -----Original Message----- From: James Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 12:04 PM To: CF-Community Subject: Centring stuff with CSS If you look at http://dev.jaysphotography.org.uk/index.cfm/page/images/ you will see thumbnails at the top of the page. No matter how hard I try I can't get these to the centre of the page and I have tried all of the normal tricks. What am I doing wrong! I have currently removed all of the centring code I tried since none of it worked anyway. I am clearly a no-hoper when it comes to CSS! -- Jay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:234516 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
