How to center align a div inside another div?



How to center align a div inside another div?..

Answer / 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

More CSS Cascading Style Sheets Interview Questions

What are the disadvantages of using css preprocessors?

0 Answers  


Why flex is used in css?

0 Answers  


How do you override the underlining of hyperlinks?

0 Answers  


What are css variables?

0 Answers  


What is a tag selector?

0 Answers  






Define Image sprites with context to CSS ?

0 Answers  


What are the text properties?

0 Answers  


How to write css for 3rd child of every <ul> tags?

0 Answers  


What are the new selectors in css3?

0 Answers  


What is the use of box-shadow in css?

0 Answers  


Explain how flexibility is achieved more in css3?

0 Answers  


What is default box sizing?

0 Answers  


Categories