Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS]CSS - bootstrap 2 wyśrodkowane columny
yha
post 27.06.2017, 16:21:34
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.06.2017

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


Da się w bootstrap, zrobić wyśrodkowane columny na col-size ?


  1. <div class="row">
  2. <div class="col-lg-5 col-centered"></div>
  3. <div class="col-lg-2 col-centered"></div>
  4. </div>


  1. .col-centered{
  2. display: block;
  3. margin-left: auto;
  4. margin-right: auto;
  5. text-align: center;
  6. }



I nie jest to zbytnio wyśrodkowane ... tak do lewej ucieka o proszę:

http://i.imgur.com/n3muXIL.png
Go to the top of the page
+Quote Post
dentopolis
post 27.06.2017, 16:36:30
Post #2





Grupa: Zarejestrowani
Postów: 252
Pomógł: 0
Dołączył: 14.08.2016

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


próbowałeś class="text-center"?
Go to the top of the page
+Quote Post
yha
post 27.06.2017, 16:42:41
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.06.2017

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


Cytat(dentopolis @ 27.06.2017, 17:36:30 ) *
próbowałeś class="text-center"?


Nic nie dało, kolumny i tak nie są wyśrodkowane
Go to the top of the page
+Quote Post
Lord
post 27.06.2017, 17:50:01
Post #4





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----


https://www.bootply.com/suFloj2gi8
https://v4-alpha.getbootstrap.com/utilities/flexbox/
Go to the top of the page
+Quote Post
yha
post 27.06.2017, 18:01:32
Post #5





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.06.2017

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


Cytat(Lord @ 27.06.2017, 18:50:01 ) *


W pierwszym linku przecież one nie są obok siebie tylko pod spodem ...
W drugim linku nie widzę odpowiedzi
Go to the top of the page
+Quote Post
Lord
post 27.06.2017, 19:15:42
Post #6





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----


https://www.bootply.com/I9UkipTACH
https://www.bootply.com/MO2o2krgkF
Go to the top of the page
+Quote Post
yha
post 27.06.2017, 19:27:47
Post #7





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.06.2017

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


http://i.imgur.com/5BCLJCS.png

Ehh czemu to gówno złośliwie nie chce działać questionmark.gif ...
Jak były tylko te dwie cyfry to OK. Z większym tekstem już ni jest jest.

Twój jeden i drugi kod nie działa prawidłowo.

Ten post edytował yha 27.06.2017, 19:30:20
Go to the top of the page
+Quote Post
Lord
post 27.06.2017, 19:31:26
Post #8





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----


podaj kod, to po 1, a po 2 wersja bootstrapa. tongue.gif

nie wiem, ja ci podałem i mi działa ;P
Go to the top of the page
+Quote Post
yha
post 27.06.2017, 19:33:42
Post #9





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.06.2017

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


<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/style.css" />

Bootstrap 3.3.7


  1.  
  2. <div class="container">
  3.  
  4. <div class="container-fluid">
  5. <div class="row d-flex justify-content-center bg-info">
  6. <div class=" col-4 bg-warning"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi arcu leo, gravida a sollicitudin et, pharetra ut nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquam nec felis nec laoreet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce fermentum malesuada metus, vel viverra eros auctor et. Ut tristique est nec nisl hendrerit, et lobortis lorem volutpat. Pellentesque erat velit, bibendum eu blandit sed, feugiat non mauris.
  7. </div>
  8. <div class=" col-4 bg-danger">
  9. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi arcu leo, gravida a sollicitudin et, pharetra ut nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquam nec felis nec laoreet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce fermentum malesuada metus, vel viverra eros auctor et. Ut tristique est nec nisl hendrerit, et lobortis lorem volutpat. Pellentesque erat velit, bibendum eu blandit sed, feugiat non mauris.
  10. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi arcu leo, gravida a sollicitudin et, pharetra ut nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquam nec felis nec laoreet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce fermentum malesuada metus, vel viverra eros auctor et. Ut tristique est nec nisl hendrerit, et lobortis lorem volutpat. Pellentesque erat velit, bibendum eu blandit sed, feugiat non mauris.
  11.  
  12.  
  13. </div>
  14. </div>
  15. </div>



Cytat(Lord @ 27.06.2017, 20:31:26 ) *
podaj kod, to po 1, a po 2 wersja bootstrapa. tongue.gif

nie wiem, ja ci podałem i mi działa ;P


Wrzuciłem gołą wersję jak u Ciebie i też nie działa ... poprawnie .... są pod spodem.
Go to the top of the page
+Quote Post
Lord
post 27.06.2017, 19:33:51
Post #10





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----


1. flex jest w 4 z tego co mi wiadomo uzyważ 3
2.

  1. <div class="container">
  2.  
  3. <div class="container-fluid">

jedno wywal

tongue.gif

tutaj też masz:

https://www.codeply.com/go/Sv6Z9eR9kk

Ten post edytował Lord 27.06.2017, 19:36:21
Go to the top of the page
+Quote Post
yha
post 27.06.2017, 20:07:29
Post #11





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.06.2017

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


Jest bootstrap 4 i ja nic o tym nie wiem? Ale chyba nie jest to pełna wersja ... Gdyż download na ich stronie wskazuje na pobieranie właśnie tej wersji co mam.

Co do linku pojawia się:


Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.

Wywaliłem container: http://i.imgur.com/n6fpg1x.png i tak nie działa.

To samo jak usuwam: <div class="container-fluid">

Nic się nie zmienia.

Bez kontenera to już całkiem jest 100 % i nie ma środka
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: 5.07.2025 - 17:02