Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="tree">
<ul>
    <li>
        <a href="">Adam</a>
        <ul>
            <li>
                <a href="">Enoch</a>
                <ul>
                    <li>
                        <a href="">Noah</a>
                        <ul>
						<li><a href="">Eber</a></li>
						<li>
							<ul>
								<li>
									<a href="">Lot</a>
								</li>
								<li class="compact abraham">
									<a href="">Abraham</a>
                                        <ul>
                                        	<li class="compact jacob">
                                            	<a href="">Jacob</a>
                                                <ul>
                                                    <li>
                                                    	<a href="">Joseph</a>
                                                        <ul>
                                                            <li>
                                                                <a href="">Moses</a>
                                                                <ul>
                                                                    <li>
                                                                        <a href="">Aaron</a>
                                                                        <ul>
                                                                            <li>
                                                                                <a href="">Elijah</a>
                                                                            </li>
                                                                            <li>
                                                                                <a href="">Elisha</a>
                                                                            </li>
                                                                        </ul>
                                                                    </li>
                                                                </ul>
                                                            </li>
                                                            <li>
                                                                <a href="">Jethro</a>
                                                            </li>
                                                            <li>
                                                                <a href="">David</a>
                                                                <ul>
                                                                    <li>
                                                                        <a href="">Solomon</a>
                                                                        <ul>
                                                                            <li>
                                                                                <a href="">Zachariah</a>
                                                                                <ul>
                                                                                    <li>
                                                                                        <a href="">Mary</a>
                                                                                        <ul>
                                                                                            <li>
                                                                                                <a href="">Jesus</a>
                                                                                            </li>
                                                                                        </ul>
                                                                                    </li>
                                                                                    <li>
                                                                                        <a href="">John</a>
                                                                                    </li>
                                                                                </ul>
                                                                            </li>
                                                                        </ul>
                                                                    </li>
                                                                </ul>
                                                            </li>
                                                            <li>
                                                                <a href="">Jonah</a>
                                                            </li>
                                                        </ul>
                                                    </li>
                                                </ul>
                                            </li>
                                            <li>
                                            	<a href="">Isaac</a>
                                            </li>
                                            <li>
                                            	<a href="">Job</a>
                                            </li>
                                            <li>
                                            	<a href="">Ezekiel</a>
                                            </li>
                                            <li>
                                            	<a href="">Ishmael</a>
                                                <ul>
                                                    <li>
                                                    	<a href="">Muhammad</a>
                                                    </li>
                                                </ul>
                                            </li>
                                        </ul>
								</li>
							</ul>
						</li>
						<li><a href="">Saleh</a></li>
					</ul>
                    </li>
                </ul>
            </li>
        </ul>
    </li>
</ul>
</div>
              
            
!

CSS

              
                * {margin: 0; padding: 0;}

.tree ul {
  font-size: 0;
  white-space: nowrap;
	padding-top: 20px; position: relative;
  text-align: center;
	
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

.tree li {
	display: inline-block;
  font-size: 16px;
  font-size: 1rem;
  text-align: center;
  vertical-align: top;
  white-space: normal;
	list-style-type: none;
	position: relative;
	padding: 20px 5px 0 5px;
	
	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: 20px;
}
.tree li::after{
	right: auto; left: 50%;
	border-left: 1px solid #ccc;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.tree li:only-child::after, .tree li:only-child::before {
	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:last-child::before{
	border-right: 1px 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;
}

/*Time to add downward connectors from parents*/
.tree ul ul::before{
	content: '';
	position: absolute; top: 0; left: 50%;
	border-left: 1px solid #ccc;
	width: 0; height: 20px;
}

.tree li a{
	border: 1px solid #ccc;
	padding: 5px 10px;
	text-decoration: none;
	color: #FFF;
	font-family: arial, verdana, tahoma;
	font-size: 15px;
	display: inline-block;
	background-color: #BED540;
	/*font-family: 'KnockoutMedium';*/
	
	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;
}

.compact.abraham {
  margin-right: -160px;
  margin-right: -10rem;
}

.compact.jacob {
  margin-left: -144px;
  margin-left: -9rem;
  margin-right: -192px;
  margin-right: -12rem;
}
              
            
!

JS

              
                // http://ima.emergingscene.com/Islamic_Faith/PropheticFamilyTree/propheticfamilytree.html

// https://codepen.io/anon/pen/rLfzD

// https://css-tricks.com/forums/topic/resizing-a-webpage-to-fit-in-to-iphone-screen/
              
            
!
999px

Console