Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML]Ułożenie napisu na obrazku w Bootstrap 4
trifek
post 20.07.2020, 15:11:13
Post #1





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 28.09.2015

Ostrzeżenie: (0%)
-----


Witam serdecznie,
Robię mały projekt w Bootstrap 4 i napotkałem na mały problem.

Mam taką stronę (podgląd problemu) http://serwer1356363.home.pl/_nauka/
Chciałbym uzyskać taki efekt: https://ibb.co/Hddz7gG

Tj na pomarańczowych "planszach" ma się znaleść:
- strzałka (jest dodana w kodzie - ale nie wyświetla się na stronie),
- napis "poznaj ofertę" ma być na dole pomarańczowego boxa

Mój aktualny kod:
  1. <section class="front-banners">
  2. <div class="container">
  3. <div class="row">
  4. <div class="col-12 col-md-6 pb-4 mb-md-1">
  5. <div class="card bg-dark text-white">
  6. <a href="/produkty">
  7. <img class="card-img" src="img/front1.jpg" alt="Produkt 1">
  8. </a>
  9. <a href="/produkty">
  10. <div class="card-img-overlay front-banner-overlay">
  11. <h5 class="card-title">Produkt 1 </h5>
  12. <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
  13. <p>Poznaj ofertę</p>
  14. </div>
  15. </a>
  16. </div>
  17. </div>
  18. <div class="col-12 col-md-6 pb-4 mb-md-1">
  19. <div class="card bg-dark text-white">
  20. <a href="/produkty">
  21. <img class="card-img" src="img/front1.jpg" alt="Produkt 1">
  22. </a>
  23. <a href="/produkty">
  24. <div class="card-img-overlay front-banner-overlay">
  25. <h5 class="card-title">Produkt 2</h5>
  26. <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
  27. <p>Produkt 2</p>
  28. </div>
  29. </a>
  30. </div>
  31. </div>
  32.  
  33. </div>
  34. </div>
  35. </section>
  36. .front-banner-overlay{
  37. background-color:#FFC700;
  38. width: 180px;
  39. height: 180px;
  40. margin: 20px;
  41. }
  42.  
  43. .front-banner-overlay h5{
  44. font-family: Inter;
  45. font-style: normal;
  46. font-weight: 500;
  47. font-size: 36px;
  48. }
  49.  
  50. .front-banner-overlay p{
  51. font-family: Inter;
  52. font-style: normal;
  53. font-size: 13px;
  54. line-height: 16px;
  55. }
  56.  


W jaki sposób mogę to zrobić?

Bardzo proszę o pomoc smile.gif

Ten post edytował trifek 20.07.2020, 15:11:59
Go to the top of the page
+Quote Post
trueblue
post 20.07.2020, 15:17:05
Post #2





Grupa: Zarejestrowani
Postów: 6 761
Pomógł: 1822
Dołączył: 11.03.2014

Ostrzeżenie: (0%)
-----


Brakuje pliku fontawesome.css - https://fontawesome.com/v4.7.0/get-started/

Dla kwadratu nadaj display:flex, flex-direction:column, a dla <p> margin-top:auto. Możesz to ustawić nadając dedykowane klasy z Bootstrap.


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 16.04.2024 - 07:42