Friday, March 4, 2016

align items center horizontally and vertically using css

In this tutorial i am going to use three css properties to align the text or image center, most of the designers who don't know they often use margin-top, line-height etc. But thats not the perfect solution so just take few minutes to apply this in your designs its really helpful.

Step - 1 : CSS

  height: 100%

  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

Step - 2 : HTML

<div class="container">
    <h4>This is a sample text</h4>



  1. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
    WordPress website development Chennai

  2. Once in a while I invest more energy advancing myself than I do really accomplishing the work itself.Webdesign

  3. Just wanna comment that you have a very nice site, I the style and design it actually stands out. new york web design company

  4. The electronic cigarette makes use of a battery and a small heating aspect the vaporize the e-liquid. This vapor can then be inhaled and exhaled website designers nyc

  5. you might have a fantastic weblog here! would you wish to make some invite posts on my weblog? new york website design company

  6. Cheap Kasper Suits… [...]listed below are a couple of urls to internet websites we connect to for the fact we feel they really are really worth browsing[...]… new york web designs

  7. This comment has been removed by the author.

  8. Thanks for your insight for the great posting. I am glad I have taken the time to see this. san francisco brand agency

  9. Many thanks for the great posting. I am glad I have taken the time to see this. branding firms san francisco

  10. I was reading through some of your content on this internet site and I believe this site is really instructive! Keep putting up. ux agency san francisco


Copyright © All rights reserved