dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: help about change responsive organization chart

  1. #1
    Join Date
    Oct 2017
    Posts
    1

    resolved help about change responsive organization chart

    hello
    i have this chart: https://codepen.io/siiron/pen/aLkdE

    i want customize it, for example change it like below image (i edited in photoshop)
    anyone can help me? really this charts programmed with hand? or there is any generator?

    screenshot: http://www.codingforums.com/attachme...hart-chart-jpg

    i edited in top much.

    thanks.

  2. #2
    Join Date
    Dec 2005
    Location
    TX
    Posts
    7,884

    Lightbulb

    Code below is not complete, but it might give you some ideas about using a 'grid' in the design.
    It becomes a whole lot easier to modify with additional CSS statements.

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> Organization Chart </title>
    
    <!-- From: https://codepen.io/siiron/pen/aLkdE
          For: http://www.webdeveloper.com/forum/showthread.php?366489-help-about-change-responsive-organization-chart
     Grid from: https://www.w3schools.com/Css/css_rwd_grid.asp 
    -->
    
    <style>
     * { box-sizing: border-box; }
     .row { margin: 1em 0; }
     .row::after {
        content: "";
        clear: both;
        display: table;
     }
     [class*="col-"] {
        float: left;
        padding: 16px;
     }
     .col-1  {width: 8.33%;}
     .col-2  {width: 16.66%;}
     .col-3  {width: 25%;}
     .col-4  {width: 33.33%;}
     .col-5  {width: 41.66%;}
     .col-6  {width: 50%;}
     .col-7  {width: 58.33%;}
     .col-8  {width: 66.66%;}
     .col-9  {width: 75%;}
     .col-10 {width: 83.33%;}
     .col-11 {width: 91.66%;}
     .col-12 {width: 100%;}
    
     html { font-family: "Lucida Sans", sans-serif; }
     .header {
        padding: 16px;
        background-color: #9933cc;
        color: #ffffff;
        margin-bottom: 0.5em;
     }
     .menu ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
     }
     .menu li {
        padding: 8px;
        margin-bottom: 1.5em;
        background-color: #33b5e5;
        color: #ffffff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
     }
     .menu li:hover { background-color: #0099cc; }
     ul { list-style-type: none; }
    </style>
    </head>
    <body>
    
    <div class="row">
      <div class="col-4"></div>
      <ul>
        <li class="col-4 header" style="text-align:center">President</li>
      </ul>
      <div class="col-4"></div>
    </div>
    <br>
    
    <div class="row">
      <div class="col-2"></div>
      <div class="col-3 header" style="text-align:center">Administration</div>
      <div class="col-2"></div>
      <div class="col-3 header" style="text-align:center">Assistant Director</div>
      <div class="col-2"></div>
    </div>
    <br>
    
    <div class="row">
      <div class="col-4"></div>
      <ul>
        <li class="col-4 header" style="text-align:center">Director</li>
      </ul>
      <div class="col-4"></div>
    </div>
    <br>
    
    <div class="row">
    
      <div class="col-1"></div>
    
      <div class="col-2 menu">
        <ul>
          <li>Department A</li>
          <li>Section A1</li>
          <li>Section A2</li>
          <li>Section A3</li>
          <li>Section A4</li>
          <li>Section A5</li>
          <li>Section A6</li>
        </ul>
      </div>
    
      <div class="col-2 menu">
        <ul>
          <li>Department B</li>
          <li>Section B1</li>
          <li>Section B2</li>
          <li>Section B3</li>
          <li>Section B4</li>
          <li>Section B5</li>
        </ul>
      </div>
    
      <div class="col-2 menu">
        <ul>
          <li>Department C</li>
          <li>Section C1</li>
          <li>Section C2</li>
          <li>Section C3</li>
          <li>Section C4</li>
          <li>Section C5</li>
        </ul>
      </div>
    
      <div class="col-2 menu">
        <ul>
          <li>Department D</li>
          <li>Section D1</li>
          <li>Section D2</li>
          <li>Section D3</li>
          <li>Section D4</li>
          <li>Section D5</li>
          <li>Section D6</li>
          <li>Section D7</li>
        </ul>
      </div>
    
      <div class="col-2 menu">
        <ul>
          <li>Department E</li>
          <li>Section E1</li>
          <li>Section E2</li>
          <li>Section E3</li>
          <li>Section E4</li>
        </ul>
      </div>
    
      <div class="col-1"></div>
    
    </div>
    
    </body>
    </html>
    Good Luck!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles