<style>
* {
margin: 0;
padding: 0;
font-family:sans-serif,Arial;
font-size:8pt;
}

fieldset { 
width: 670px;
margin-left: 5px;
border:1px solid green 
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
padding: 5px;
margin-top: 5px;
height: 300px;
}


fieldset .tree {
white-space: nowrap;
//min-width: 700px;
width: 670px;
min-height:500px;
}

fieldset .tree ul {
padding: 20px 0 0 0;
position: relative;
transition: all 0.5s;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
}
fieldset .tree li {
float: left;
text-align: center;
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;
line-height: 0.9;
}
/*We will use ::before and ::after to draw the connectors*/
fieldset .tree li::before, .tree li::after {
content: '';
position: absolute;
top: 0;
right: 50%;
border-top: 1px solid #ccc;
width: 50%;
height: 20px;
}
fieldset .tree li::after {
right: auto;
left: 50%;
border-left: 1px solid #ccc;
}
/*We need to remove left-right connectors from elements without any siblings*/
fieldset .tree li:only-child::after, .tree li:only-child::before {
display: none;
}
/*Remove space from the top of single children*/
fieldset .tree li:only-child {
padding-top: 0;
}
/*Remove left connector from first child and right connector from last child*/
fieldset .tree li:first-child::before, .tree li:last-child::after {
border: 0 none;
}
/*Adding back the vertical connector to the last nodes*/
fieldset .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;
}
fieldset .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*/
fieldset .tree ul ul::before {
content: '';
position: absolute;
top: 0;
left: 50%;
border-left: 1px solid #ccc;
width: 0;
height: 20px;
}
fieldset .tree li div  {
border: 1px solid #ccc;
padding: 5px 10px;
text-decoration: none;
color: #666;
font-family: arial, verdana, tahoma;
font-size: 9px;
display: inline-block;
min-width: 70px;
min-height: 30px;
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;

}




fieldset .tree li div .male {
	font-weight: bold;
background-color:lightblue;
display: inline-block;
min-width:70px;
padding:2px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}

fieldset .tree li div .male .dates {
	display:relative;
	font-size: 6pt;
	font-weight: normal;
}
fieldset .tree li div .male .place {
	display:relative;
	font-size: 6pt;
	font-style:italic;
	font-weight: normal;
}

fieldset .tree li div .maleserved {
background-color:lightblue;
display: inline-block;
min-width:70px;
padding:2px;
border: 3px solid blue;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
fieldset .tree li div .maleserved .dates {
	display:relative;
	font-size: 6pt;
	font-weight: normal;
}
fieldset .tree li div .maleserved .place {
	display:relative;
	font-size: 6pt;
	font-style:italic;
	font-weight: normal;
}
fieldset .tree li div .femaleserved {
background-color:lightpink;
display: inline-block;
min-width:70px;
padding:2px;
border: 3px solid blue;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
fieldset .tree li div .femaleserved .dates {
	display:relative;
	font-size: 6pt;
	font-weight: normal;
}
fieldset .tree li div .femaleserved .place {
	display:relative;
	font-size: 6pt;
	font-style:italic;
	font-weight: normal;
}

fieldset .tree li div .maledied {
background-color:lightblue;
display: inline-block;
min-width:70px;
padding:2px;
border: 5px solid black;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
fieldset .tree li div .maledied .dates {
	display:relative;
	font-size: 6pt;
	font-weight: normal;
}
fieldset .tree li div .maledied .place {
	display:relative;
	font-size: 6pt;
	font-style:italic;
	font-weight: normal;
}
fieldset .tree li div .female {
background-color:lightpink;
font-weight: bold;
display: inline-block;
min-width:70px;
padding:2px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;

}
fieldset .tree li div .female .dates {
	display:relative;
	font-size: 6pt;
	font-weight: normal;
}
fieldset .tree li div .female .place {
	display:relative;
	font-size: 6pt;
	font-style:italic;
	font-weight: normal;
}
fieldset .tree li div .spacer {
background-color:lightblue;
display: inline-block;
width:10px;
}
/*Time for some hover effects*/
/*We will apply the hover effect the the lineage of the element also*/
fieldset .tree li div:hover, .tree li div:hover + ul li div {
background: #c8e4f8;
color: #000;
border: 1px solid #94a0b4;
}
/*Connector styles on hover*/
fieldset .tree li div:hover + ul li::after,
fieldset .tree li div:hover + ul li::before,
fieldset .tree li div:hover + ul::before,
fieldset .tree li div:hover + ul ul::before {
border-color: #94a0b4;
}
fieldset .tree li li li {
	margin-left: 30%;
}
</style>