html - CSS: dashed border under 2 divs -


sample image

please see attached image , fiddle. idea have 2 tables side side (the blue boxes) , can select row in each table , press red link button below. lines connect boxes , link buttons need dashed border. height of blue boxes vary.

here can find fiddle of have far.

<div class="container cf">     <div class="link">         <div class="linkbutton">             <input type="button" value="link" />         </div>     </div>      <div class="tab table1">table left </div>     <div class="tab table2">table right</div> </div> 

i having difficulties centering link button , wondering how robust html because of positioning link button , container using negative values.

any suggestions on better structure welcome. need support ie7 cannot take advantage of :before, :after , other pseudo elements.

here simplified version of it, changed order of tables, floating 1 first, therefore clear fix won't necessary.

<div class="tab table2">table right</div> <div class="tab table1">table left</div> 

full code/demo below.

.container {      width: 500px;      position: relative;      margin-bottom: 70px;  }  .tab {      background: #00395c;      color: #fff;      width: 200px;      height: 100px; /*try different height*/  }  .table2 {      float: right;  }  .link {      border: 2px dashed grey;      border-top-width: 0;      width: 300px;      height: 50px;      text-align: center;      position: absolute;      left: 50%;      bottom: -50px;      margin-left: -150px;  }  .link input {      position: relative;      bottom: -40px;  }
<div class="container">      <div class="link">          <input type="button" value="link" />      </div>      <div class="tab table2">table right</div>      <div class="tab table1">table left</div>  </div>  <div class="anotherdiv">this div</div>

jsfiddle demo


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -