Center aligning div elements

Well, in most of the scenarios in a web designing art, you might come across one wherein you have to center align a div tag, without affecting the text in it. Your first thought might be text-align:center;

But if you want to center align the div alone, leaving the text alignment to be unaffected, you can use this trick css styling. Just give the margin of the div as : margin:0 auto; Lol… done.

It goes well for all browsers.

Thats all… you can now center align a div without affecting the text-alignment of the div contents.

  1. salam. ozr mikham ba oooultk mikhastam emailhamo chek kunam, barha saay kardam, emailhamo ham miare ama akharesh in error ro minevise va minevise contact your isp. error in hast (ox8ooccc0r) ya synchronizing subscribed folder for [email]مرورگر این کاربر سیستم عامل این کاربر


  2. Hi there, rjiang. The Newsletter suiitrspcbon is what gives you access to the Downloads Section. Please check your spam filter for email from . you should have received a confirmation email with your suiitrspcbon and the password is included in that message. I just tested the suiitrspcbon and current password and they appear to be working correctly. Please let me know if your issues persist after receiving the confirmation email. Thank you. The SharePoint Dude.


Leave a Reply to Adriana Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: