I'm creating a Dreamweaver CSS site based off a template I purchased. In this site, I want to have page with a gallery of my company's products. So I went to http://smoothgallery.jondesign.net/, used the "Gallery Set" setup, and put it into my web page. It all works GREAT...except the gallery is left-aligned and I want it centered on my page.

I'm a novice. I'm not all that familiar with css or javascript, and nothing I'm doing is getting my gallery to center. I'm sure it's a simple fix, but like I said...I'm a novice. Help?

Member Avatar for Pnorq

Did you try

#your_container {
margin-left: auto;
margin-right: auto;
}

If your element is inside a div and the div is 100% in width, margin-left: auto; to your inner element should do it. If it is just an element inside a body tag or inside a div which does not have a width value specify, it won't work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.