Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. /* general */
  2. html {
  3. box-sizing: border-box;
  4. }
  5.  
  6. *, *:before, *:after {
  7. box-sizing: inherit;
  8. }
  9.  
  10. /* clearfix */
  11. .group:before, .container:before,
  12. .group:after, .container:after {
  13. content: " ";
  14. display: table;
  15. }
  16.  
  17. .group:after, .container:after {
  18. clear: both;
  19. }
  20.  
  21. body {
  22. font-size: 2em;
  23. text-align: center;
  24. }
  25.  
  26. img {
  27. width: 100%;
  28. max-width: 100%;
  29. vertical-align: middle;
  30. }
  31.  
  32. h1.text-muted {
  33. color: #57aec1; /* questionable */
  34. /*opacity: .7;*/
  35. }
  36.  
  37. a {
  38. text-decoration: none;
  39. }
  40.  
  41. strong {
  42. color: #f9c029;
  43. font-weight: normal;
  44. }
  45.  
  46. .container {
  47. max-width: 1120px;
  48. margin: 0 auto;
  49. }
  50.  
  51. pre {
  52. text-align: left;
  53. }
  54.  
  55.  
  56. article {
  57. color: #fff;
  58. font-size: 17px;
  59. font-weight: normal;
  60. background: #9F3FA3;
  61. border-radius: 9px;
  62. margin-bottom: 25px;
  63. /*min-height: 320px;*/
  64.  
  65. float: left;
  66. width: 19.2%;
  67.  
  68. padding: 40px 14px;
  69. margin-right: 1%;
  70. }
  71.  
  72. article h4 {
  73. font-weight: 600;
  74. margin-top: 0;
  75. margin-bottom: 15px;
  76. }
  77.  
  78. article p {
  79. /*margin-bottom: 0;*/
  80. font-weight: 300;
  81. }
  82.  
  83. article a,
  84. article a:hover {
  85. color: #fff;
  86. }
  87.  
  88. article:nth-child(1) { background: #3b9ae1; }
  89. article:nth-child(2) { background: #f6be00; }
  90. article:nth-child(3) { background: #e64134; }
  91. article:nth-child(4) { background: #eb70b1; }
  92. article:nth-child(5) { background: #0f1a5f; margin-right: 0; }
  93.  
  94.  
  95. .comments {
  96. height: 40px;
  97. line-height: 37px;
  98. width: 40px;
  99. background: url('chat_b.svg') 0 0 no-repeat;
  100. display: inline-block;
  101. margin-top: 10px;
  102. margin-bottom: 0;
  103. font-weight: 600;
  104. font-size: 15px;
  105. }
  106.  
  107.  
  108.  
  109. /* media queries */
  110. @media screen and ( max-width: 820px ) {
  111.  
  112. article {
  113. width: 49.5%; /* 2 elementy su vedla seba, to je 100%, ale medzi nimi je 1% margin, cize 99/2 = 49.5% */
  114. margin-bottom: 1%;
  115. min-height: 260px; /* uz mozu byt o nieco nizsie */
  116. }
  117.  
  118. article:nth-child(2),
  119. article:nth-child(3) {
  120. margin-right: 0; /* pri druhom a tretom elemente nechceme pravy margin, lebo teraz su na kraji */
  121. }
  122.  
  123. article:nth-child(3) {
  124. width: 100%; /* treti element je na cely riadok */
  125. }
  126.  
  127. }
  128.  
  129. @media screen and ( max-width: 560px ) {
  130.  
  131. article {
  132. /* uz ziadne marginy */
  133. margin-right: 0;
  134.  
  135. /* elementy budu na celu sirku, pod sebou, ziadne floaty */
  136. width: 100%;
  137. float: none;
  138.  
  139. /* uz im nebudeme nastavovat minimalnu vysku */
  140. min-height: 0;
  141. }
  142.  
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement