November 5, 200620 yr How do I center using CSS. I am working on my Production groups website and I am having trouble centering. Any help here? I am centering a background.
November 5, 200620 yr Ok if you want to position a div in the middle apply this rule: margin: 0 auto ; If you want to center the background use: background-position: center; Hope that helps
November 10, 200619 yr I always find that using margin: 0 auto; in the body tag works, but was told ages ago to also add text-align: centre; probably to get it to work in MSIE or some other browser - not sure if this is still relevant but I always put it in for safety
Create an account or sign in to comment