Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:07:07+00:00 2026-06-16T03:07:07+00:00

Im trying to create a simple family tree using HTML (I also could include

  • 0

Im trying to create a simple family tree using HTML (I also could include CSS and Javascript if needed). I would like to achieve something like this:

http://www.gmrv.es/~sschvartzman/Sara_C._Schvartzman/example.png

Does anybody know how I can make this?

EDIT:

The structure from which Im constructing this webpage is of the type:

Father
Mother
n Number of children
children[n]

I want to construct this figure automatically. I want each person to have a link to another webpage, but I think this will be easy once I have the figure.

Thank you for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:07:08+00:00Added an answer on June 16, 2026 at 3:07 am

    I finally managed to create a multiple parent family tree diagram.

    <!DOCTYPE html> <html> <head><META http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport"content="width=device-width, initial-scale=1.0"> <meta name="description" content=""><meta name="author" content=""><link href="tree.css" rel="stylesheet">
    <title>Family Tree</title> </head><body> <h1>Schvartzman family tree</h1>
    <div class="tree">
        <ul class="pf">
            <li class="parent">
                <a  class="f_nolink">
                    <div class="person"">Claudia<br>Avila<span>(1961 - )</span></div> 
                </a>
            </li>
            <li class="divorce">
                <ul class="c">              <li>
                        <a  class="m_nolink">
                            <div class="person"">Sebastian<br>Berdichevsky<span>(1981 - )</span></div> 
                        </a>
                    </li>
                    <li>
                        <a href="@F62327212@.html" class="f">
                            <div class="person"">Sara<br>Berdichevsky<span>(1986 - )</span></div> 
                        </a>
                    </li>
                    <li>
                        <a  class="m_nolink">
                            <div class="person"">Manuel<br>Berdichevsky<span>(1987 - )</span></div> 
                        </a>
                    </li>
                    <li>
                        <a  class="m_nolink">
                            <div class="person"">Sergio<br>Berdichevsky<span>(1989 - )</span></div> 
                        </a>
                    </li>
                </ul>
            </li>
            <li class="parentWithAncestor">
                <a href="@F62638334@.html" class="m">
                    <div class="person"">Eduardo<br>Berdichevsky<span>(1961 - )</span></div> 
                </a>
            </li>
            <li class="marriage">
                <ul class="c">              <li>
                        <a  class="f_nolink">
                            <div class="person"">Abigail<br>Berdichevsky<span>(2001 - )</span></div> 
                        </a>
                    </li>
                    <li>
                        <a  class="m_nolink">
                            <div class="person"">Tobias<br>Berdichevsky<span>(2003 - )</span></div> 
                        </a>
                    </li>
                    <li>
                        <a  class="m_nolink">
                            <div class="person"">Iamin<br>Berdichevsky<span>(2007 - )</span></div> 
                        </a>
                    </li>
                </ul>
            </li>
            <li class="parent">
                <a  class="f_nolink">
                    <div class="person"">Carolina<br>Overlar<span>(1978 - )</span></div> 
                </a>
            </li>
        </ul>
    </div>
    
    <br>
    </body> </html>
    

    using a CSS file:

    .tree * {margin: 0; padding: 0; }
    
    body {
    
        font-family: arial, verdana, tahoma;
        font-size: 12px;
        color: #666;
        background-color:#fff;
    
    }
    
    .tree{
        white-space:nowrap;
        padding-bottom: 250px;
    }
    
    .tree ul {
        padding-top: 5px; position: relative;
        display: table;
        margin: 0 auto;
        font-size:0;
    
        transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
    }
    
    .tree li {
        /*float: left; */
        display:inline-block;
        text-align: center;
        list-style-type: none;
        position: relative;
        padding: 70px 5px 0 5px;
        font-size: 12px;
    
        transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
    }
    
    /*We will use ::before and ::after to draw the connectors*/
    
    .tree li::before, .tree li::after{
        content: '';
        position: absolute; top: 0; right: 50%;
        border-top: 1px solid #ccc;
        width: 50%; height: 70px;
    }
    .tree li::after{
        right: auto; left: 50%;
        border-left: 2px solid #ccc;
    }
    
    /*We need to remove left-right connectors from elements without 
    any siblings*/
    .tree li:only-child::after {
        display: none;
    }
    
    /*Remove space from the top of single children*/
    /*
    .tree li:only-child{ padding-top: 0;}
    */
    /*Remove left connector from first child and 
    right connector from last child*/
    .tree li:first-child::before, .tree li:last-child::after{
        border: 0 none;
    }
    
    
    /*Adding back the vertical connector to the last nodes*/
    .tree li li:last-child::before{
        border-right: 2px solid #ccc;
        border-radius: 0 5px 0 0;
        -webkit-border-radius: 0 5px 0 0;
        -moz-border-radius: 0 5px 0 0;
    }
    .tree li:first-child::after{
        border-radius: 5px 0 0 0;
        -webkit-border-radius: 5px 0 0 0;
        -moz-border-radius: 5px 0 0 0;
    }
    
    
    .tree li li:only-child::before {
        right: auto; left: 50%;
        border-left: 2px solid #ccc;
        border-right:none;
    }
    /*
    .tree ul.p>li::before {
        border:none;
        content: '&';
        left:0;
        width:100%; 
        }
    
    .tree ul.p>li::after{
        content: '';
        position: absolute; top: 0; right: 50%;
        border-top: none;
        width: 50%; height: 20px;
    }
    
    .tree ul.p>li::after{
        border-left: none;
    }
    */
    /* Use pf to indicate that its a child of another family. */
    .tree ul.pf>li::before {
        right: auto; left: 50%;
        border-left: 2px solid #ccc;
        border-right:none;
        }
    
    .tree ul.pf>li::after{
        content: '';
        position: absolute; top: 0; right: 50%;
        border-top: none;
        width: 50%; height: 20px;
    }
    
    .tree ul.pf>li::after{
        border-left: none;
    }
    
    
    
    /*Time to add downward connectors from parents*/
    
    .tree ul.c {
        padding-top: 70px; 
        }
    
    
    .tree ul ul.c::before{
        content: '';
        position: absolute; top: 0; left: 50%;
        border-left: 2px solid #ccc;
        width: 0; height: 20px;
        border: none;
    }
    
    .tree li a{
        border: 1px solid #ccc;
        padding: 0px;
        text-decoration: none;
        color: #666;
        background-color:#fff;
        /*background-image:url(circle.jpg)*/
        /*color: #fff;
        background-color:#999;*/
        display: inline-block;
        min-width:50px;
    
        border-radius: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
    
    
        transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
    }
    
    /* red border on contacts
    .tree li a.o{
        border: 1px solid #f66;
    }
    */
    
    .tree li a span{
        display:block;
        font-size: 10px;
    
    }
    
    /*Time for some hover effects*/
    /*We will apply the hover effect the the lineage of the element also*/
    /*.tree li a.m:hover { background: #c8e4f8; color: #000; border: 1px solid #94a0b4; }   
    .tree li a.f:hover { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; } 
    
    .tree li a:hover+ul li a.m { background: #c8e4fb; color: #000; border: 1px solid #94a0b4; } 
    .tree li a:hover+ul li a.f { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; } 
    
    .tree li a.md:hover { background: #c8e4f8; color: #000; border: 1px solid #94a0b4; }    
    .tree li a.fd:hover { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; }    
    
    .tree li a:hover+ul li a.md { background: #c8e4fb; color: #000; border: 1px solid #94a0b4; }    
    .tree li a:hover+ul li a.fd { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; }*/  
    
    .tree li a.m{width:80px;height:80px;border-radius:15px;font-size:10px;color:#000;text-align:center;background: #c8e4fb; box-shadow:1px 1px 2px #000}
    .tree li a.f{width:80px;height:80px;border-radius:50px;font-size:10px;color:#000;text-align:center;background: #ffc0cb; box-shadow:1px 1px 2px #000}
    .tree li a.m_dead{width:80px;height:80px;border-radius:15px;font-size:10px;color:#000;text-align:center;background: #F1F9FE; box-shadow:1px 1px 2px #000}
    .tree li a.f_dead{width:80px;height:80px;border-radius:50px;font-size:10px;color:#000;text-align:center;background: #FFF0F2;box-shadow:1px 1px 2px #000}
    .tree li a.m_nolink{width:80px;height:80px;border-radius:15px;font-size:10px;color:#000;text-align:center;background: #c8e4fb; box-shadow:1px 1px 2px #000}
    .tree li a.f_nolink{width:80px;height:80px;border-radius:50px;font-size:10px;color:#000;text-align:center;background: #ffc0cb; box-shadow:1px 1px 2px #000}
    .tree li a.m_dead_nolink{width:80px;height:80px;border-radius:15px;font-size:10px;color:#000;text-align:center;background: #F1F9FE; box-shadow:1px 1px 2px #000}
    .tree li a.f_dead_nolink{width:80px;height:80px;border-radius:50px;font-size:10px;color:#000;text-align:center;background: #FFF0F2;box-shadow:1px 1px 2px #000}
    
    .tree li.marriage{ height:0px; border: 1px; border-style: solid; border-color: #000; color: #000; padding: 0 ; background: #FFF; }
    .tree li.marriage::before{border: none}
    .tree li.divorce{ height:0px; border: 2px; border-style: dashed; border-color: #000; color: #000; padding: 0 ; background: #FFF; }
    .tree li.divorce::before{border: none}
    .tree  ul.pf>li.parent::before{border: none}
    .tree  ul.pf>li.parentWithAncestor::before{border-top: none;}
    
    .tree div.person
    {
        display:inline-block;
        vertical-align:central;
        padding:20px 0px;
        width:80px; 
    }
    /*
    .tree li a.m:hover{width:100px;height:100px;border-radius:15px;font-size:12px;color:#000;text-align:center;background: #c8e4fb; box-shadow:0 0 4px #222 inset}
    .tree li a.f:hover{width:100px;height:100px;border-radius:50px;font-size:12px;color:#000;text-align:center;background: #ffc0cb; box-shadow:0 0 4px #222 inset}
    .tree li a.m_dead:hover{width:100px;height:100px;border-radius:15px;font-size:12px;color:#000;text-align:center;background: #F1F9FE; box-shadow:0 0 4px #222 inset}
    .tree li a.f_dead:hover{width:100px;height:100px;border-radius:50px;font-size:12px;color:#000;text-align:center;background: #FFF0F2; box-shadow:0 0 4px #222 inset}
    */
    /*.tree li a.m { background: #c8e4f8; color: #000; border: 1px solid #94a0b4; } 
    .tree li a.f { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; }   
    
    .tree li a.md { background: #c8e4f8; color: #000; border: 1px solid #94a0b4; }  
    .tree li a.fd { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; }  
    
    .tree li a+ul li a.m { background: #c8e4fb; color: #000; border: 1px solid #94a0b4; }   
    .tree li a+ul li a.f { background: #ffc0cb; color: #000; border: 1px solid #94a0b4; }*/ 
    
    
    /*Thats all. I hope you enjoyed it.
    Thanks :)*/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying create this simple ish to-do list web app using JavaScript &
Im trying to create a simple pan and zoom app using silverlight 4, but
I am trying to create a simple program using Gstreamer to take the input
I'm trying to create simple windows app uisng WinAPi. Here is the code: #include
Im trying to create a simple dll file.Im following the tutorial http://java.sun.com/docs/books/jni/html/start.html when i
I was trying to create simple program that would perform some trivial operation with
I'm trying create a simple audio stream server like a concept proof, but I'm
I'm trying to create simple (facebook like) menu in my app. I've found several
I am trying to create simple translator translating something like: aaa | bbb |
I am trying to create simple user registration form. I have an index.html file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.