Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML][CSS] Responsywność
deli55
post 4.12.2017, 19:18:58
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 3.12.2017

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


Witam,
mam tabelkę z 5 kolumnami, każda kolumna to ikonka numer i tekst obok siebie, chciałbym aby się to dobrze wyświetlało także na smartfonach, jeżeli wejdę na stronę z telefonu, to po prostu pokazują się 2 tabelki zamiast 5, chciałbym żeby było to responsywne na telefonie i jedna tabelka na jeden wiersz. Poniżej kod CSS. Jest to bardzo proste zadanie ale ja jeszcze nie do końca ogarniam CSS żeby do tego dojść.

  1. body {
  2. font-family: Arial;
  3. padding: 10px;
  4. background-color: #f5f5f5;
  5. color: #808080;
  6. text-align: center;
  7. }
  8.  
  9. /*-=-=-=-=-=-=-=-=-=-=-=- */
  10. /* Column Grids */
  11. /*-=-=-=-=-=-=-=-=-=-=-=- */
  12.  
  13. .col_half { width: 49%; }
  14. .col_third { width: 32%; }
  15. .col_fourth { width: 23.5%; }
  16. .col_fifth { width: 18.4%; }
  17. .col_sixth { width: 15%; }
  18. .col_three_fourth { width: 74.5%;}
  19. .col_twothird{ width: 66%;}
  20. .col_half,
  21. .col_third,
  22. .col_twothird,
  23. .col_fourth,
  24. .col_three_fourth,
  25. .col_fifth{
  26. position: relative;
  27. display:inline;
  28. display: inline-block;
  29. float: left;
  30. margin-right: 2%;
  31. margin-bottom: 20px;
  32. }
  33. .end { margin-right: 0 !important; }
  34. /* Column Grids End */
  35.  
  36. .wrapper { width: 980px; margin: 1px auto; position: relative;}
  37. .counter { background-color: #ffffff; padding: 20px 0; border-radius: 5px;}
  38. .count-title { font-size: 40px; font-weight: normal; margin-top: 10px; margin-bottom: 0; text-align: center; }
  39. .count-text { font-size: 13px; font-weight: normal; margin-top: 10px; margin-bottom: 0; text-align: center; }
  40. .fa-2x { margin: 0 auto; float: none; display: table; color: #b5b3b4; }


Czy naprawdę nikt nie jest w stanie mi pomóc:(?

Ten post edytował deli55 3.12.2017, 23:08:39
Go to the top of the page
+Quote Post
trzczy
post 4.12.2017, 21:03:50
Post #2





Grupa: Zarejestrowani
Postów: 460
Pomógł: 49
Dołączył: 5.06.2011

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


Zrób najpierw stronę, która poprawnie wyświetla 'hello world' i jest oparta na poprawnym szkielecie html5. Przecież ty nawet nie ogarniasz, że style są w head przed body. Kolejność nauki jest taka: hulajnoga, rower, motor, samochód.
Go to the top of the page
+Quote Post
emillo91
post 4.12.2017, 22:41:57
Post #3





Grupa: Zarejestrowani
Postów: 129
Pomógł: 13
Dołączył: 29.03.2012

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


Istnieje takie coś jak zapytania medialne np:
CODE

  1. @media all and (min-width:480px) and (max-width:800px) {
  2. div {
  3. background-color:red;
  4. }
  5. }


dzięki temu możesz kombinować z rozmiarami tabel przy różnej wielkości ekranu
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: 6.06.2025 - 18:41