Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Bootstrap stopka na dole strony 2 kolumny
Lejto
post 6.12.2014, 21:18:51
Post #1





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


Mam problem ze stopką na dole strony. Wszystko wygląda ok jak oglądamy stronę na ekranie laptopa lub większego monitora. Problem jest dla mniejszych rozdzielczości kiedy kolumny schodzą pod siebie, nie wiem w czym jest błąd. W pliku foortererror pokazuje jak stopka nachodzi na stronę, a w pliku footernormal jest poprawny wynik.


Kod:




  1. <!DOCTYPE html>
  2. <head lang="pl">
  3. <meta charset="UTF-8">
  4. <link rel="stylesheet" href="css/style.css" type="text/css">
  5. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
  6.  
  7. <!-- Optional theme -->
  8. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
  9.  
  10. <!-- Latest compiled and minified JavaScript -->
  11. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
  12. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  13. <script src="jquery.backstretch.js"></script>
  14. </head>
  15. $.backstretch("img/bg.jpg");
  16. h1 {
  17. text-align: center;
  18. font-family: "AvanteGarde";
  19. font-size: 70px;
  20. }
  21. header p{
  22. font-family: "AvanteGarde";
  23. text-align: center;
  24. font-size: 20px;
  25. }
  26. @font-face{
  27. font-family:"AvanteGarde";
  28. src: url('font/font2.ttf');
  29. }
  30. .col-centered{
  31.  
  32. text-align: center;
  33. margin: 0 auto;
  34. }
  35. .footer {
  36. position: absolute;
  37. bottom: 0;
  38. width: 100%;
  39. /* Set the fixed height of the footer here */
  40. height: 60px;
  41. text-align: center;
  42. font-family:"AvanteGarde";
  43. }
  44. .ng{
  45. color: #3a8c03;
  46. font-family: "AvanteGarde";
  47. font-size: 40px;
  48. margin-top: 0;
  49. }
  50. html {
  51. height: 100%;
  52. width: 100%;
  53. min-width: 100%;
  54. min-height: 100%;
  55. position: relative;
  56. }
  57.  
  58. body {
  59. height: 100%;
  60. width: 100%;
  61. padding: 0;
  62. margin: 0;
  63. margin-bottom: 60px;
  64. }
  65.  
  66. .container-fluid{
  67. height:60%;
  68. display:table;
  69. width: 100%;
  70. padding: 0;
  71. }
  72.  
  73. .row-fluid {height: 100%; display:table-cell; vertical-align: middle;}
  74.  
  75. .centering {
  76. float:none;
  77. margin:0 auto;
  78. }
  79. header{
  80. margin-bottom: 2%;
  81. }
  82.  
  83. <header>
  84. <h1><label style="color: #3a8c03"> F.P.H.U </label> <label style="color: #254c0b"> Darmont</label></h1>
  85. <p style="color: #3a8c03">KOMINKI - OCZYSZCZALNIE - DORADZTWO - SERWIS</p>
  86. </header>
  87.  
  88. <div class="container-fluid" style="width: 900px; margin: auto;">
  89. <div class="row-fluid">
  90.  
  91. <div class="col-sm-6 col-centered">
  92. <img src="img/oczyszczalnie.png" class="img-responsive center-block">
  93. <p class="ng">oczyszczalnie</p>
  94. </div>
  95.  
  96. <div class="col-sm-6 col-centered" style="padding-left: 120px">
  97. <img src="img/kominki.png" class="img-responsive center-block">
  98. <p class="ng">kominki</p>
  99. </div>
  100.  
  101. </div>
  102. </div>
  103. <footer class="footer">
  104. <p>Skontaktuj sie z nami i zapytaj o produkty</p>
  105. <p>nr. tel: 924 456 256 e-mail: aaa@sga.com</p>
  106. </footer>
  107. </body>
  108. </html>



--------------------
Go to the top of the page
+Quote Post
janek5
post 12.12.2014, 21:47:10
Post #2





Grupa: Zarejestrowani
Postów: 13
Pomógł: 1
Dołączył: 6.12.2014

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


Usuń pozycjonowanie absolutne dla .footer, jest zbędne.

BTW po co ustawiasz na sztywno szerokość, trochę bez sensu rozwiązanie korzystając z grid?
Go to the top of the page
+Quote Post
tomek200
post 30.12.2014, 19:27:49
Post #3





Grupa: Zarejestrowani
Postów: 102
Pomógł: 4
Dołączył: 28.12.2014

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


  1. .footer {
  2. position: absolute;
  3. bottom: 0;
  4. width: 1000px;
  5. /* Set the fixed height of the footer here */
  6. height: 60px;
  7. text-align: center;
  8. font-family:"AvanteGarde";
  9. }

w linijce width zmieniasz na 1000px i powinno dzialać.
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 - 23:21