Centrando verticalmente IV: CSS Grid

18/Dic/2017 16

Con CSS Grids a la vuelta de la esquina en cuanto a soporte cross-browser, podemos ya considerarlo para centrar horizontal y verticalmente. De todos los artículos escritos anteriormente esta es lejos la manera más simple y fácil de lograr centrar un elemento respecto de su contenedor.

HTML:

<div class="container">
  <p class="centered">Centrado con CSS Grid</p>
</div>
.container {
  height: 100%;
  display: grid;
}
.centered {
  margin: auto;
}

Comentarios

  1. Felipe [#]

    me funciono perfecto, gracias!

  2. Jaime [#]

    Lo terrible es que no es soportado por ciertos navegadores viejos que odio

  3. Fabio [#]

    Anduvo perfecto. Muchas gracias, muy útil.

  4. altyazili [#]

    Hi there. I discovered your website by means of Google even as searching for a similar topic, your web site got here up. It appears to be great. I have bookmarked it in my google bookmarks to come back then. Janetta Kristoforo Tiffie

  5. kesintisiz [#]

    Excellent blog here! Also your web site loads up very fast! Juana Cad Henning

  6. 720p [#]

    Tremendously intriguing points you have mentioned, thanks a lot for setting up. Hendrika Nappie Rodney

  7. turkce [#]

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why throw away your intelligence on just posting videos to your blog when you could be giving us something informative to read? Marina Lombard Sofia

  8. erotik [#]

    Definitely imagine that that you stated. Your favorite reason seemed to be on the internet the simplest factor to bear in mind of. I say to you, I definitely get irked even as people think about issues that they just do not understand about. You controlled to hit the nail upon the highest as well as defined out the entire thing without having side effect , other people could take a signal. Will probably be back to get more. Thank you Alvinia Tymothy Holtz

  9. turkce [#]

    Really glad to read it and i hope you always share with us this type of news. THanks for the sharing some useful news with us. Blanca Christophe Alon

  10. turkce [#]

    I appreciate you sharing this blog article. Much thanks again. Great. Letti Claudius Floyd

  11. turkce [#]

    Wow, great blog article. Really thank you! Awesome. Karoly Elroy Gothart

  12. turkce [#]

    Hiya here, just got mindful of your weblog through Bing, and found that it is truly educational. I will appreciate if you continue this post. Darbie Taber Eirene

  13. turkce [#]

    Absolutely composed subject matter, Really enjoyed reading. Cherilyn Hastings Ruthy

  14. cialis generic cialis [#]

    cialis 20mg

  15. Oypwyl [#]

    tadalafil dosage – best place to buy tadalafil online reviews tadalafil liquid

  16. Gprdmb [#]

    generic tadalafil online – tadalafil professional tadalafil 20

Deja tu Comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

CSSLab