Advertisement
LegoDrifter

WebStorm 4 ( Inline and block )

Jul 1st, 2020
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <link rel="stylesheet" href="css/style.css">
  9. <title>Inline & Block Styling</title>
  10. </head>
  11. <body>
  12. <ul>
  13. <li><a href="#">Tech</a></li>
  14. <li><a href="#">Business</a></li>
  15. <li><a href="#">Fashion</a></li>
  16. <li><a href="#">Sports</a></li>
  17. </ul>
  18. <br><br>
  19. <img src="./css/img/img2.jpg" alt="My image">
  20. <br><br>
  21. <div class="box">
  22. <h3>Heading </h3>
  23. <p>The doer gains anger which is not psychic.<br>
  24. The seeker gains.<br>
  25. Happiness doesn’t wisely hear any lotus —
  26. but the masteris what wrestles.</p>
  27. </div>
  28. <div class="box">
  29. <h3>Heading </h3>
  30. <p>The doer gains anger which is not psychic.<br>
  31. The seeker gains.<br>
  32. Happiness doesn’t wisely hear any lotus —
  33. but the masteris what wrestles.</p>
  34. </div>
  35. <div class="box">
  36. <h3>Heading </h3>
  37. <p>The doer gains anger which is not psychic.<br>
  38. The seeker gains.<br>
  39. Happiness doesn’t wisely hear any lotus —
  40. </p>
  41. </div>
  42. </body>
  43. </html>
  44.  
  45.  
  46.  
  47.  
  48.  
  49. body
  50. {
  51. font-family: Arial,sans-serif;
  52. }
  53. li{
  54. /* Sekoj link od listata e block element i zazema celosen prosor*/
  55. display: inline;
  56. /* Sea go pravime inline taka shto visokot prostor go nema i ke se pripojat horizontalno */
  57.  
  58. }
  59. li a{
  60. padding-right: 20px;
  61.  
  62. }
  63. img
  64. {
  65. height: auto;
  66. width: auto;
  67. max-width: 300px;
  68. max-height: 300px;
  69. display: block;
  70. margin: auto;
  71. border: 3px solid black;
  72. border-radius: 10px;
  73. box-sizing: border-box;
  74. }
  75. .box
  76. {
  77. background: grey;
  78. display: inline-block; /* Box e prvicno block element no ako sakame horizontalno site da gi namestime morame
  79. da koristime inline - block bidejki samo so online ne bi rabotelo */
  80. padding: 20px;
  81. margin-bottom: 15px;
  82. width: 31%;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement