Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. <div class="container">
  2. <div class="column">Stretch to fill?</div>
  3. <div class="column">
  4. <select size="15">
  5. <option>Option 1</option>
  6. <option>Option 2</option>
  7. </select>
  8. </div>
  9. <div>
  10.  
  11. .container {
  12. padding: 5px;
  13. border: 1px solid black;
  14. }
  15.  
  16. .container .column {
  17. display: inline-block;
  18. width: 40%;
  19. background-color: #AAA;
  20. padding: 5px;
  21. margin: 5px;
  22. vertical-align: top;
  23.  
  24. height: 100%;
  25. }
  26.  
  27. select {
  28. width: 100%;
  29. }
  30.  
  31. .cf:before,
  32. .cf:after {
  33. content: " "; /* 1 */
  34. display: table; /* 2 */
  35. }
  36.  
  37. .cf:after {
  38. clear: both;
  39. }
  40.  
  41.  
  42. *, *:before, *:after {
  43. -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
  44. }
  45.  
  46. .faux-columns {
  47. width: 80%;
  48. margin:3em auto;
  49. background-image: -webkit-linear-gradient(left, #f2f7fa 25%, #fff 75%);
  50. background-image: -moz-linear-gradient(left, #f2f7fa 25%, #fff 75%);
  51. background-image: -o-linear-gradient(left, #f2f7fa 25%, #fff 75%);
  52. background-image: linear-gradient(left, #f2f7fa 25%, #fff 75%);
  53. background: -webkit-gradient(linear, left top, right top, color-stop(0%,#f2f7fa), color-stop(25%, #f2f7fa), color-stop(25%,#ffffff), color-stop(100%,#ffffff));
  54. background: -moz-linear-gradient(left, #f2f7fa 0%, #f2f7fa 25%, #ffffff 25%, #ffffff 100%);
  55. background: -webkit-gradient(linear, left top, right top, color-stop(0%,#f2f7fa), color-stop(25%,#f2f7fa), color-stop(25%,#ffffff), color-stop(100%,#ffffff));
  56. background: -o-linear-gradient(left, #f2f7fa 0%,#f2f7fa 25%,#ffffff 25%,#ffffff 100%);
  57. background: -ms-linear-gradient(left, #f2f7fa 0%,#f2f7fa 25%,#ffffff 25%,#ffffff 100%);
  58. background: linear-gradient(left, #f2f7fa 0%,#f2f7fa 25%,#ffffff 25%,#ffffff 100%);
  59. border:1px solid #c1c1c2;
  60. }
  61.  
  62. .col-1, .col-2 {
  63. float:left;
  64. vertical-align:top;
  65. padding:2em 3em;
  66. }
  67.  
  68. .col-1 {
  69. position:relative;
  70. width:25%;
  71. background:#F2F7FC;
  72. border-right:1px solid #c1c1c2;
  73.  
  74. }
  75.  
  76. .col-2 {
  77. width:75%;
  78. border-left:1px solid #c1c1c2;
  79. margin-left: -1px;
  80.  
  81. }
  82.  
  83. .col-1:after,
  84. .col-1:before {
  85. top:100%;
  86. border:solid transparent;content:"";
  87. height:0;
  88. width:0;
  89. position:absolute;
  90. pointer-events:none;
  91. display:block;
  92. }
  93. .col-1:after {
  94. border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) #f2f7fa;
  95. border-style: solid;
  96. border-width: 21px 0 21px 22px;
  97. left:100%;
  98. top: 47px;
  99. }
  100. .col-1:before {
  101. border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #c1c1c2;
  102. border-style: solid;
  103. border-width: 22px 0 22px 23px;
  104. left: 100%;
  105. top: 46px; }
  106.  
  107. <div class="faux-columns cf">
  108. <div class="col-1">
  109. <h4>First column with bordered triangle pseudo element attached to it. The background needs to be the full height of .faux-columns</h4>
  110. </div>
  111. <div class="col-2">
  112. <h4> Second column which in some cases will be much taller than column</h4>
  113. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
  114.  
  115. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
  116. </div>
  117. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement