CSS Org Chart

Developer
Size
3,882 Kb
Views
36,432

How do I make an css org chart?

What is a css org chart? How do you make a css org chart? This script and codes were developed by UX Snippets on 27 October 2022, Thursday.

CSS Org Chart Previews

CSS Org Chart - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Org Chart</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="pg-orgchart">	<div class="org-chart">	<ul> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/adellecharles/128.jpg" class="img-responsive" /> <div class="name">Luann Brannick</div> <div class="role">System Architect</div> <a class="manager" href="#">Mike Dinardo</a> </div> <ul> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/nzcode/128.jpg" class="img-responsive" /> <div class="name">Lynn Maynard</div> <div class="role">System Architect</div> <a class="manager" href="#">Luann Brannick</a> </div> <ul> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/towhidzaman/128.jpg" class="img-responsive" /> <div class="name">Fleta Odriscoll</div> <div class="role">System Architect</div> <a class="manager" href="#">Lynn Maynard</a> </div> </li> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/arashmil/128.jpg" class="img-responsive" /> <div class="name">Elfreda Grebin</div> <div class="role">System Architect</div> <a class="manager" href="#">Lynn Maynard</a> </div> </li> </ul> </li> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/vista/128.jpg" class="img-responsive" /> <div class="name">Jahn Philson Doe</div> <div class="role">System Architect</div> <a class="manager" href="#">Luann Brannick</a> </div> <ul> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/marcosmoralez/128.jpg" class="img-responsive" /> <div class="name">Roy Lemarie</div> <div class="role">System Architect</div> <a class="manager" href="#">Jahn Philson Doe</a> </div> </li> <li> <div class="user"> <img src="https://s3.amazonaws.com/uifaces/faces/twitter/jina/128.jpg" class="img-responsive" /> <div class="name">Eloisa Stubbolo</div> <div class="role">System Architect</div> <a class="manager" href="#">Jahn Philson Doe</a> </div> </li> </ul> </li> </ul> </li> </ul>	</div>
</div> <script src="js/index.js"></script>
</body>
</html>

CSS Org Chart - Script Codes CSS Codes

* { margin: 0; padding: 0;
}
body { background: #22659c;
}
.org-chart { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.org-chart ul { padding-top: 20px; position: relative; -webkit-transition: all 0.5s; transition: all 0.5s;
}
.org-chart ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid #ccc; width: 0;
}
.org-chart li { float: left; text-align: center; list-style-type: none; position: relative; padding: 20px 10px; -webkit-transition: all 0.5s; transition: all 0.5s;
}
.org-chart li::before, .org-chart li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid #ccc; width: 50%; height: 20px;
}
.org-chart li::after { right: auto; left: 50%; border-left: 1px solid #ccc;
}
.org-chart li:only-child::after, .org-chart li:only-child::before { display: none;
}
.org-chart li:only-child { padding-top: 0;
}
.org-chart li:first-child::before, .org-chart li:last-child::after { border: 0 none;
}
.org-chart li:last-child::before { border-right: 1px solid #ccc; border-radius: 0 5px 0 0;
}
.org-chart li:first-child::after { border-radius: 5px 0 0 0;
}
.org-chart li .user { text-decoration: none; color: #666; display: inline-block; padding: 20px 10px; -webkit-transition: all 0.5s; transition: all 0.5s; background: #fff; min-width: 180px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
.org-chart li .user:hover, .org-chart li .user:hover + ul li .user { background: #b5d5ef; color: #002A50; -webkit-transition: all 0.15s; transition: all 0.15s; -webkit-transform: translateY(-5px); transform: translateY(-5px); box-shadow: inset 0 0 0 3px #76b1e1, 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}
.org-chart li .user:hover img, .org-chart li .user:hover + ul li .user img { box-shadow: 0 0 0 5px #4c99d8;
}
.org-chart li .user:hover + ul li::after,
.org-chart li .user:hover + ul li::before,
.org-chart li .user:hover + ul::before,
.org-chart li .user:hover + ul ul::before { border-color: #94a0b4;
}
.org-chart li .user > div, .org-chart li .user > a { font-size: 12px;
}
.org-chart li .user img { margin: 0 auto; max-width: 60px; max-width: 60px; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 0 0 5px #aaa;
}
.org-chart li .user .name { font-size: 16px; margin: 15px 0 0; font-weight: 300;
}
.org-chart li .user .role { font-weight: 600; margin-bottom: 10px; margin-top: 5px;
}
.org-chart li .user .manager { font-size: 12px; color: #b21e04;
}

CSS Org Chart - Script Codes JS Codes

// yanked from http://thecodeplayer.com/walkthrough/css3-family-tree
// and turned into scss
// Warning: The above site is super sketchy with random page navigation, click bombs, etc.
// Browse with care. \
CSS Org Chart - Script Codes
CSS Org Chart - Script Codes
Home Page Home
Developer UX Snippets
Username appirio-ux
Uploaded October 27, 2022
Rating 3
Size 3,882 Kb
Views 36,432
Do you need developer help for CSS Org Chart?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

UX Snippets (appirio-ux) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!