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 the purpose of cm measurement unit?

354


How to select all paragraph elements whose lang attribute has a value of exactly "fr"?

449


What are the advantages of inline styles?

339


What are the difference between "position:absolute" & "position:relative" in css?

359


What is a style sheet in editing?

331






What are the associate boarder image properties in css3?

337


Do any wysiwyg editor support the creation of style sheets? Any text-based html editor?

372


hot to specify the content box size of a block element?

314


Enlist the media types CSS allows?

345


How to overrule underlining Hyperlinks?

608


How to create rounded corners using css3?

314


How does the index function?

325


What are the advantages disadvantages of using css preprocessors?

362


What is flex value?

363


What's the difference between resetting and normalizing css?

392