For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Tuesday, December 03, 2024

How to make center align child div

 How to make center align child div?

 

Suppose you have 2 Div tag. And want the make inner tag center

<div id="d1">

    <div id="d2">

 

     </div>

  </div>

 

Then you will use below 1 line css code as below:

style="margin: 0 auto;" 


<div id="d1">

    <div id="d2" style="margin: 0 auto;" >

 

     </div>

  </div>

Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip