public marks

PUBLIC MARKS from decembre with tags css-tricks & percentage

04 July 2013 13:30

CSS - Centering Percentage Width/Height Elements | CSS-Tricks

by 1 other (via)
If you know the exact width/height of an element, you can center it smack dab in the middle of its parent element easily with this classic trick: top and left set to 50% and negative margins half the width and height of the element. That's great if you know the width and height of the element you're trying to center, but what if they are percentages?

decembre's TAGS related to tag css-tricks

article +   background-image +   center +   centrer +   collection +   convert +   convertir +   css +   datauri +   demo +   design +   dev +   ebook +   flexbox +   font +   font@face +   free +   horizontal +   icon +   icone +   image +   javascript +   media:queries +   online +   percentage +   position +   pourcentage +   ratio +   resize +   selecteur +   selector +   svg +   tab +   target +   tool +   trucs +   tutorial +   tutoriel +