hya im working on a template and i have the body and a content box and i want to align the content box to center of body how can i do this in css

ty jan x

Recommended Answers

All 3 Replies

ive tried that but nothing as changed see pic included the contain in the middle is what im trying to move x

Ah, thought you meant you wanted someone vertically and horizontally centered on the body, like a login box.

You should be able just use margin:0 auto; to horizontally align it. If that's not working, then it's probably another style conflicting with it.

Be a part of the DaniWeb community

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