How to center align a div inside another div?

Answer Posted / hrpynux@gmail.com

Use the "inline-block" value of the display property to display the inner <div> as an inline element as well as a block. Set the text-align property on the outer <div> element to center the inner one.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is VH/VW (viewport height/ viewport width) in CSS?

318


How can we group heading elements in html?

287


What are the necessities of using html forms?

1277


How to apply css to iframe?

276


how can imported style sheets be linked? Explain with the help of an example?

277






What does webkit mean in css?

319


What is z index in css?

288


What is gradient in css3?

297


Explain rwd.

290


Why css is used in html?

290


What is a fully responsive website?

289


What is cascading in hibernate?

310


What is a clearfix?

281


What is the difference between padding and margin?

304


What is the meaning of excise duty?

293