Jump to content

centering a div


jskogheim

Recommended Posts

I'm trying to center a div with an unknown width. I know using auto margins requires a width, is there any way around this? Actually auto margins doesn't even work when I specify a width. I'm thinking that is because the div I'm trying to center is in a div that is already using auto margins. Any suggestions???Heres the page I'm working on: www.jakobskogheim.com/portfolios.htmlI'm trying to center the three portfolio sections which are contained in a div with the id 'group'. The css file: www.jakobskogheim.com/css/style.cssThanks

Link to comment
Share on other sites

disabling Firebug worked...now to the problem:removing the table-cell rule centres the images, but it also moves them to the top of the containing div.will that work? are you planning on more than these three images?

Link to comment
Share on other sites

It looks like thats just using auto margins to position the body in the center, and then padding to control each list item. I'm already using auto margins on the main div, and you need to specify a width to use them, which I'd like to not do. And even if I do specify a width, it still doesn't work. Maybe I'm not seeing whats going on in that example?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...