{"id":57928,"date":"2018-12-28T04:18:54","date_gmt":"2018-12-28T11:18:54","guid":{"rendered":"http:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/"},"modified":"2018-12-28T04:18:54","modified_gmt":"2018-12-28T11:18:54","slug":"common-css-issues-for-front-end-projects","status":"publish","type":"post","link":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/","title":{"rendered":"Common CSS Issues For Front-End Projects"},"content":{"rendered":"<link rel=\"canonical\" href=\"https:\/\/www.smashingmagazine.com\/2018\/12\/common-css-issues-front-end-projects\/\"><title>Common CSS Issues For Front-End Projects<\/title><\/p>\n<article>\n<header>\n<h1>Common CSS Issues For Front-End Projects<\/h1>\n<address>Ahmad Shadeed<\/address>\n<p>                  <time datetime=\"2018-12-27T13:30:11+01:00\">2018-12-27T13:30:11+01:00<\/time><time datetime=\"2018-12-28T09:58:20+00:00\">2018-12-28T09:58:20+00:00<\/time><\/header>\n<p>When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common issues, with their solutions, as a handy reference guide for when you\u2019re working on a new project.<\/p>\n<p>Let\u2019s begin.<\/p>\n<h3>1. Reset The Backgrounds Of <code>button<\/code> And <code>input<\/code> Elements<\/h3>\n<p>When adding a button, reset its background, or else it will look different across browsers. In the example below, the same button is shown in Chrome and in Safari. The latter adds a default gray background.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f61d43c4-6a6e-4d9f-8cdc-be1a519b9ee3\/button-and-inputs.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/button-and-inputs.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f61d43c4-6a6e-4d9f-8cdc-be1a519b9ee3\/button-and-inputs.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f61d43c4-6a6e-4d9f-8cdc-be1a519b9ee3\/button-and-inputs.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f61d43c4-6a6e-4d9f-8cdc-be1a519b9ee3\/button-and-inputs.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f61d43c4-6a6e-4d9f-8cdc-be1a519b9ee3\/button-and-inputs.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/button-and-inputs.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f61d43c4-6a6e-4d9f-8cdc-be1a519b9ee3\/button-and-inputs.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p>Resetting the background will solve this issue:<\/p>\n<pre><code>button {\n  appearance: none;\n  background: transparent;\n  \/* Other styles *\/\n}\n<\/code><\/pre>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"MzWBYv\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/MzWBYv\/\">Button and Inputs<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<aside data-audience=\"non-subscriber\">\n<div>\n<div>\n<p>Front-end is messy and complicated these days. That&#8217;s why we publish <a href=\"https:\/\/smashed.by\/perfpanelarticles\">articles<\/a>, <a href=\"https:\/\/smashed.by\/perfpanelbooks\">printed books<\/a> and <a href=\"https:\/\/smashed.by\/perfpaneltv\">webinars<\/a> with useful techniques to improve your work. Even better: <a href=\"https:\/\/smashed.by\/perfpanelmembership\">Smashing Membership<\/a> with a growing selection of <strong>front-end\u00a0&#038;\u00a0UX goodies<\/strong>. So you get your work done, better and faster.<\/p>\n<p>      <a href=\"https:\/\/smashed.by\/perfpanelmembership\"><br \/>\n        Explore Smashing Membership\u00a0?<br \/>\n      <\/a>\n      <\/div>\n<div>\n        <a href=\"https:\/\/smashed.by\/perfpanelmembership\"><\/p>\n<div>\n          <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/images\/smashing-cat\/cat-rollerderby.svg\" alt=\"Smashing Cat, just preparing to do some magic stuff.\" width=\"310\" height=\"400\"><\/div>\n<p>      <\/a>\n      <\/div>\n<\/p><\/div>\n<\/aside>\n<h3>2. Overflow: <code>scroll<\/code> vs. <code>auto<\/code><\/h3>\n<p>To limit the height of an element and allow the user to scroll within it, add <code>overflow: scroll-y<\/code>. This will look good in Chrome on macOS. However, on Chrome Windows, the scroll bar is always there (even if the content is short). This is because <code>scroll-y<\/code> will show a scroll bar regardless of the content, whereas <code>overflow: auto<\/code> will show a scroll bar only when needed.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/424ab30e-eac3-45c0-b9d0-04763ec6e6cf\/overflow-y.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/overflow-y.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/424ab30e-eac3-45c0-b9d0-04763ec6e6cf\/overflow-y.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/424ab30e-eac3-45c0-b9d0-04763ec6e6cf\/overflow-y.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/424ab30e-eac3-45c0-b9d0-04763ec6e6cf\/overflow-y.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/424ab30e-eac3-45c0-b9d0-04763ec6e6cf\/overflow-y.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/overflow-y.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\tLeft: Chrome on macOS. Right: Chrome on Windows. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/424ab30e-eac3-45c0-b9d0-04763ec6e6cf\/overflow-y.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<pre><code>.element {\n    height: 300px;\n    overflow-y: auto;\n}\n<\/code><\/pre>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"vQYwXj\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/vQYwXj\/\">overflow-y<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<h3>3. Add <code>flex-wrap<\/code><\/h3>\n<p>Make an element behave as a flex container simply by adding <code>display: flex<\/code>. However, when the screen size shrinks, the browser will display a horizontal scroll bar in case <code>flex-wrap<\/code> is not added.<\/p>\n<pre><code><div class=\"wrapper\">\n  <div class=\"item\"><\/div>\n  <div class=\"item\"><\/div>\n  <div class=\"item\"><\/div>\n  <div class=\"item\"><\/div>\n  <div class=\"item\"><\/div>\n  <div class=\"item\"><\/div>\n<\/div>\n<\/code><\/pre>\n<pre><code>.wrapper {\n  display: flex;\n}\n\n.item {\n  flex: 0 0 120px;\n  height: 100px;\n}\n<\/code><\/pre>\n<p>The example above will work great on big screens. On mobile, the browser will show a horizontal scroll bar.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/6d093ace-fe0a-4e1d-9731-4167b43dc5ff\/flex-wrap.jpg?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/flex-wrap.jpg 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/6d093ace-fe0a-4e1d-9731-4167b43dc5ff\/flex-wrap.jpg 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/6d093ace-fe0a-4e1d-9731-4167b43dc5ff\/flex-wrap.jpg 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/6d093ace-fe0a-4e1d-9731-4167b43dc5ff\/flex-wrap.jpg 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/6d093ace-fe0a-4e1d-9731-4167b43dc5ff\/flex-wrap.jpg 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/flex-wrap.jpg?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\tLeft: A horizontal scroll bar is shown, and the items aren\u2019t wrapped. Right: The items are wrapped onto two rows. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/6d093ace-fe0a-4e1d-9731-4167b43dc5ff\/flex-wrap.jpg\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p>The solution is quite easy. The wrapper should know that when space is not available, it should wrap the items.<\/p>\n<pre><code>.wrapper {\n    display: flex;\n    flex-wrap: wrap;\n}\n<\/code><\/pre>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"JejVLG\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/JejVLG\/\">flex-wrap<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<h3>4. Don\u2019t Use <code>justify-content: space-between<\/code> When The Number Of Flex Items Is Dynamic<\/h3>\n<p>When <code>justify-content: space-between<\/code> is applied to a flex container, it will distribute the elements and leave an equal amount of space between them. Our example has eight card items, and they look good. What if, for some reason, the number of items was seven? The second row of elements would look different than the first one.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c36764b1-db7b-4b62-9e54-1265b8058ebf\/justify-content.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/justify-content.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c36764b1-db7b-4b62-9e54-1265b8058ebf\/justify-content.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c36764b1-db7b-4b62-9e54-1265b8058ebf\/justify-content.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c36764b1-db7b-4b62-9e54-1265b8058ebf\/justify-content.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c36764b1-db7b-4b62-9e54-1265b8058ebf\/justify-content.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/justify-content.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\tThe wrapper with eight items. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c36764b1-db7b-4b62-9e54-1265b8058ebf\/justify-content.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/9f194fe2-73f1-4815-983a-6a8953da7e43\/justify-content-less-items.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/justify-content-less-items.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/9f194fe2-73f1-4815-983a-6a8953da7e43\/justify-content-less-items.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/9f194fe2-73f1-4815-983a-6a8953da7e43\/justify-content-less-items.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/9f194fe2-73f1-4815-983a-6a8953da7e43\/justify-content-less-items.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/9f194fe2-73f1-4815-983a-6a8953da7e43\/justify-content-less-items.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/justify-content-less-items.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\tThe wrapper with seven items. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/9f194fe2-73f1-4815-983a-6a8953da7e43\/justify-content-less-items.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"XyWLLo\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/XyWLLo\/\">justify-content<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<p>In this case, using CSS grid would be more suitable.<\/p>\n<h3>5. Long Words And Links<\/h3>\n<p>When an article is being viewed on a mobile screen, a long word or inline link might cause a horizontal scroll bar to appear. Using CSS\u2019 <code>word-break<\/code> will prevent that from happening.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/long-words.gif\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/long-words.gif?resize=473%2C622\" width=\"473\" height=\"622\" alt=\"\"><\/a><figcaption><a href=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/long-words.gif\">Large preview<\/a><\/figcaption><\/figure>\n<pre><code>.article-content p {\n    word-break: break-all;\n}   \n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/965443c4-3be5-4ba9-ba7c-9376da152f6b\/long-words-solved.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/long-words-solved.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/965443c4-3be5-4ba9-ba7c-9376da152f6b\/long-words-solved.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/965443c4-3be5-4ba9-ba7c-9376da152f6b\/long-words-solved.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/965443c4-3be5-4ba9-ba7c-9376da152f6b\/long-words-solved.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/965443c4-3be5-4ba9-ba7c-9376da152f6b\/long-words-solved.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/long-words-solved.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/965443c4-3be5-4ba9-ba7c-9376da152f6b\/long-words-solved.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p><a href=\"https:\/\/css-tricks.com\/snippets\/css\/prevent-long-urls-from-breaking-out-of-container\/\">Check out CSS-Tricks<\/a> for the details.<\/p>\n<h3>6. Transparent Gradients<\/h3>\n<p>When adding gradient with a transparent start and end point, it will look black-ish in Safari. That&#8217;s because Safari doesn\u2019t recognize the keyword <code>transparent<\/code>. By substituting it with <code>rgba(0, 0, 0, 0)<\/code>, it will work as expected. Note the below screenshot:<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/756d8b47-21c4-4b75-8b99-8805ea880b24\/transparent-gradient.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/transparent-gradient.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/756d8b47-21c4-4b75-8b99-8805ea880b24\/transparent-gradient.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/756d8b47-21c4-4b75-8b99-8805ea880b24\/transparent-gradient.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/756d8b47-21c4-4b75-8b99-8805ea880b24\/transparent-gradient.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/756d8b47-21c4-4b75-8b99-8805ea880b24\/transparent-gradient.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/transparent-gradient.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\tTop: Chrome 70. Bottom: Safari 12. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/756d8b47-21c4-4b75-8b99-8805ea880b24\/transparent-gradient.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<pre><code>.section-hero {\n  background: linear-gradient(transparent, #d7e0ef), #527ee0;\n  \/*Other styles*\/\n}\n<\/code><\/pre>\n<p>This should instead be:<\/p>\n<pre><code>.section-hero {\n  background: linear-gradient(rgba(0, 0, 0,0), #d7e0ef), #527ee0;\n  \/*Other styles*\/\n}\n<\/code><\/pre>\n<h3>7. The Misconception About The Difference Between <code>auto-fit<\/code> And <code>auto-fill<\/code> In CSS Grid<\/h3>\n<p>In CSS grid, the <code>repeat<\/code> function can create a responsive column layout without requiring the use of media queries. To achieve that, use either <code>auto-fill<\/code> or <code>auto-fit<\/code>.<\/p>\n<pre><code>.wrapper {\n    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));\n}\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/72b6190c-a54e-4ab3-97fa-a83c1bd96527\/auto-fill-vs-auto-fit.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/auto-fill-vs-auto-fit.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/72b6190c-a54e-4ab3-97fa-a83c1bd96527\/auto-fill-vs-auto-fit.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/72b6190c-a54e-4ab3-97fa-a83c1bd96527\/auto-fill-vs-auto-fit.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/72b6190c-a54e-4ab3-97fa-a83c1bd96527\/auto-fill-vs-auto-fit.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/72b6190c-a54e-4ab3-97fa-a83c1bd96527\/auto-fill-vs-auto-fit.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/auto-fill-vs-auto-fit.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/72b6190c-a54e-4ab3-97fa-a83c1bd96527\/auto-fill-vs-auto-fit.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p>In short, <code>auto-fill<\/code> will arrange the columns without expanding their widths, whereas <code>auto-fit<\/code> will collapse them to zero width but only if you have empty columns. Sara Soueidan has written an <a href=\"https:\/\/css-tricks.com\/auto-sizing-columns-css-grid-auto-fill-vs-auto-fit\/\">excellent article<\/a> on the topic.<\/p>\n<div><\/div>\n<h3>8. Fixing Elements To The Top Of The Screen When The Viewport Is Not Tall Enough<\/h3>\n<p>If you fix an element to the top of the screen, what happens if the viewport is not tall enough? Simple: It will take up screen space, and, as a result, the vertical area available for the user to browse the website will be small and uncomfortable, which will detract from the experience.<\/p>\n<pre><code>@media (min-height: 500px) {\n    .site-header {\n        position: sticky;\n        top: 0;\n        \/*other styles*\/\n    }\n}\n<\/code><\/pre>\n<p>In the snippet above, we\u2019re telling the browser to fix the header to the top only if the viewport\u2019s height is equal to or greater than 500 pixels.<\/p>\n<p>Also important: When you use <code>position: sticky<\/code>, it won\u2019t work unless you specify the <code>top<\/code> property.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ebf1d848-4f96-4dc6-999c-5b06d06237d6\/fixed-header.gif?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/fixed-header-800w.gif?fit=900%2C520\" width=\"900\" height=\"520\" alt=\"\"><\/a><figcaption><a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ebf1d848-4f96-4dc6-999c-5b06d06237d6\/fixed-header.gif\">Large preview<\/a><\/figcaption><\/figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"oQLYmg\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/oQLYmg\/\">Vertical media queries: Fixed Header<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<h3>9. Setting <code>max-width<\/code> For Images<\/h3>\n<p>When adding an image, define <code>max-width: 100%<\/code>, so that the image resizes when the screen is small. Otherwise, the browser will show a horizontal scroll bar.<\/p>\n<pre><code>img {\n    max-width: 100%;\n}\n<\/code><\/pre>\n<h3>10. Using CSS Grid To Define <code>main<\/code> And <code>aside<\/code> Elements<\/h3>\n<p>CSS grid can be used to define the <code>main<\/code> and <code>aside<\/code> sections of a layout, which is a perfect use for grid. As a result, the <code>aside<\/code> section\u2019s height will be equal to that of the <code>main<\/code> element, even if it\u2019s empty.<\/p>\n<p>To fix this, align the <code>aside<\/code> element to the start of its parent, so that its height doesn\u2019t expand.<\/p>\n<pre><code>.wrapper {\n  display: grid;\n  grid-template-columns: repeat(12, minmax(0, 1fr));\n  grid-gap: 20px;\n}\n\n\/\/ align-self will tell the aside element to align itself with the start of its parent.\naside {\n  grid-column: 1 \/ 4;\n  grid-row: 1;\n  align-self: start;\n}\n\nmain {\n  grid-column: 4 \/ 13;\n}\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/80f4372d-8642-4865-913d-2df7634405a9\/main-and-aside.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/main-and-aside.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/80f4372d-8642-4865-913d-2df7634405a9\/main-and-aside.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/80f4372d-8642-4865-913d-2df7634405a9\/main-and-aside.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/80f4372d-8642-4865-913d-2df7634405a9\/main-and-aside.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/80f4372d-8642-4865-913d-2df7634405a9\/main-and-aside.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/main-and-aside.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/80f4372d-8642-4865-913d-2df7634405a9\/main-and-aside.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"yQJgXr\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/yQJgXr\/\">main and aside<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<h3>11. Adding <code>fill<\/code> To An SVG<\/h3>\n<p>Sometimes, while working with SVGs, <code>fill<\/code> won\u2019t work as expected if the <code>fill<\/code> attribute has been added inline in the SVG. To solve this, either to remove the <code>fill<\/code> attribute from the SVG itself or override <code>fill: color<\/code>.<\/p>\n<p>Take this example:<\/p>\n<pre><code>.some-icon {\n    fill: #137cbf;\n}\n<\/code><\/pre>\n<p>This won\u2019t work if the SVG has an inline fill. It should be this instead:<\/p>\n<pre><code>.some-icon path {\n    fill: #137cbf;\n}\n<\/code><\/pre>\n<h3>12. Working With Pseudo-Elements<\/h3>\n<p>I love to use pseudo-elements whenever I can. They provide us with a way to create fake elements, mostly for decorative purposes, without adding them to the HTML.<\/p>\n<p>When working with them, the author might forget to do one of the following:<\/p>\n<ul>\n<li>add the <code>content: \"\"<\/code> property,<\/li>\n<li>set the <code>width<\/code> and <code>height<\/code> without defining the <code>display<\/code> property for it.<\/li>\n<\/ul>\n<p>In the example below, we have a title with a badge as a pseudo-element. The <code>content: \"\"<\/code> property should be added. Also, the element should have <code>display: inline-block<\/code> set in order for the <code>width<\/code> and <code>height<\/code> to work as expected.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2d68e677-dd33-4714-9576-8e6031bb63f0\/hiding-pseudo-element.gif?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/hiding-pseudo-element-800w.gif?w=900\"   alt=\"\"><\/a><figcaption><a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2d68e677-dd33-4714-9576-8e6031bb63f0\/hiding-pseudo-element.gif\">Large preview<\/a><br \/>\n<\/figcaption><\/figure>\n<h3>13. The Weird Space When Using <code>display: inline-block<\/code><\/h3>\n<p>Setting two or more elements to <code>display: inline-block<\/code> or <code>display: inline<\/code> will create a tiny space between each one. The space is added because the browser is interpreting the elements as words, and so it\u2019s adding a character space between each one.<\/p>\n<p>In the example below, each item has a space of <code>8px<\/code> on the right side, but the tiny space caused by using <code>display: inline-block<\/code> is making it <code>12px<\/code>, which is not the desired result.<\/p>\n<pre><code>li:not(:last-child) {\n  margin-right: 8px;\n}\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/a9c8f61f-75b9-4c63-8f7a-b4a95b472e14\/inline-block-before.jpg?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/inline-block-before.jpg 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/a9c8f61f-75b9-4c63-8f7a-b4a95b472e14\/inline-block-before.jpg 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/a9c8f61f-75b9-4c63-8f7a-b4a95b472e14\/inline-block-before.jpg 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/a9c8f61f-75b9-4c63-8f7a-b4a95b472e14\/inline-block-before.jpg 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/a9c8f61f-75b9-4c63-8f7a-b4a95b472e14\/inline-block-before.jpg 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/inline-block-before.jpg?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/a9c8f61f-75b9-4c63-8f7a-b4a95b472e14\/inline-block-before.jpg\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p>A simple fix for this is to set <code>font-size: 0<\/code> on the parent element.<\/p>\n<pre><code>ul {\n    font-size: 0;\n}\n\nli {\n    font-size: 16px; \/*The font size should be reassigned here because it will inherit `font-size: 0` from its parent.*\/\n}\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f94d53ad-2aaf-4960-bd66-30b0abbaefeb\/inline-block-after.jpg?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/inline-block-after.jpg 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f94d53ad-2aaf-4960-bd66-30b0abbaefeb\/inline-block-after.jpg 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f94d53ad-2aaf-4960-bd66-30b0abbaefeb\/inline-block-after.jpg 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f94d53ad-2aaf-4960-bd66-30b0abbaefeb\/inline-block-after.jpg 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f94d53ad-2aaf-4960-bd66-30b0abbaefeb\/inline-block-after.jpg 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/inline-block-after.jpg?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f94d53ad-2aaf-4960-bd66-30b0abbaefeb\/inline-block-after.jpg\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p data-height=\"500\" data-theme-id=\"light\" data-slug-hash=\"qQYPxV\" data-user=\"shadeed\" data-default-tab=\"result\">See the Pen <a href=\"https:\/\/codepen.io\/shadeed\/pen\/qQYPxV\/\">Inline Block Spacing<\/a> by Ahmad Shadeed (<a href=\"https:\/\/codepen.io\/shadeed\">@shadeed<\/a>) on <a href=\"https:\/\/codepen.io\/\">CodePen<\/a>.<\/p>\n<h3>14. Add <code>for=\"ID\"<\/code> When Assigning A Label Element To An Input<\/h3>\n<p>When working with form elements, make sure that all <code>label<\/code> elements have an ID assigned to them. This will make them more accessible, and when they\u2019re clicked, the associated input will get focus.<\/p>\n<pre><code><label for=\"emailAddress\">Email address:<\/label>\n<input type=\"email\" id=\"emailAddress\">\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/label-focus.gif\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/label-focus.gif?fit=900%2C326\" width=\"900\" height=\"326\" alt=\"\"><\/a><figcaption><a href=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/label-focus.gif\">Large preview<\/a><\/figcaption><\/figure>\n<h3>15. Fonts Not Working With Interactive HTML Elements<\/h3>\n<p>When assigning fonts to the whole document, they won\u2019t be applied to elements such as <code>input<\/code>, <code>button<\/code>, <code>select<\/code> and <code>textarea<\/code>. They don\u2019t inherit by default because the browser applies the default system font to them.<\/p>\n<p>To fix this, assign the font property manually:<\/p>\n<pre><code>input, button, select, textarea {\n  font-family: your-awesome-font-name;\n}\n<\/code><\/pre>\n<h3>16. Horizontal Scroll Bar<\/h3>\n<p>Some elements will cause a horizontal scroll bar to appear, due to the width of those elements.<\/p>\n<p>The easiest way to find the cause of this issue is to use CSS outline. Addy Osmani has shared a very handy <a href=\"https:\/\/gist.github.com\/addyosmani\/fd3999ea7fce242756b1\">script<\/a> that can be added to the browser console to outline every element on the page.<\/p>\n<pre><code>[].forEach.call($$(\"*\"), function(a) {\n  a.style.outline =\n    \"1px solid #\" + (~~(Math.random() * (1 <\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7da947a3-15ef-4685-a4d0-a7f60959108c\/outline-page.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/outline-page.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7da947a3-15ef-4685-a4d0-a7f60959108c\/outline-page.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7da947a3-15ef-4685-a4d0-a7f60959108c\/outline-page.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7da947a3-15ef-4685-a4d0-a7f60959108c\/outline-page.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7da947a3-15ef-4685-a4d0-a7f60959108c\/outline-page.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/outline-page.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7da947a3-15ef-4685-a4d0-a7f60959108c\/outline-page.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<h3>17. Compressed Or Stretched Images<\/h3>\n<p>When you resize an image in CSS, it could be compressed or stretched if the aspect ratio is not consistent with the width and height of the image.<\/p>\n<p>The solution is simple: Use CSS\u2019 <code>object-fit<\/code>. Its functionality is similar to that of <code>background-size: cover<\/code> for background images.<\/p>\n<pre><code>img {\n    object-fit: cover;\n}\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f0f0f149-327b-4b7a-a440-31a451c6bd84\/css-object-fit.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/css-object-fit.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f0f0f149-327b-4b7a-a440-31a451c6bd84\/css-object-fit.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f0f0f149-327b-4b7a-a440-31a451c6bd84\/css-object-fit.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f0f0f149-327b-4b7a-a440-31a451c6bd84\/css-object-fit.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f0f0f149-327b-4b7a-a440-31a451c6bd84\/css-object-fit.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/css-object-fit.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/f0f0f149-327b-4b7a-a440-31a451c6bd84\/css-object-fit.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<p>Using <code>object-fit<\/code> won\u2019t be the perfect solution in all cases. Some images need to appear without cropping or resizing, and some platforms force the user to upload or crop an image at a defined size. For example, Dribbble accepts thumbnails uploads at 800 by 600 pixels.<\/p>\n<div><\/div>\n<h3>18. Add The Correct <code>type<\/code> For <code>input<\/code>.<\/h3>\n<p>Use the correct <code>type<\/code> for an <code>input<\/code> field. This will enhance the user experience in mobile browsers and make it more accessible to users.<\/p>\n<p>Here is some HTML:<\/p>\n<pre><code><form action=\"\">\n  <p>\n    <label for=\"name\">Full name<\/label>\n    <input type=\"text\" id=\"name\">\n  <\/p>\n  <p>\n    <label for=\"email\">Email<\/label>\n    <input type=\"email\" id=\"email\">\n  <\/p>\n  <p>\n    <label for=\"phone\">Phone<\/label>\n    <input type=\"tel\" id=\"phone\">\n  <\/p>\n<\/form>\n<\/code><\/pre>\n<p>This is how each input will look once it\u2019s focused:<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d3404c2-b73c-4e85-af46-968223da8393\/input-mobile.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/input-mobile.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d3404c2-b73c-4e85-af46-968223da8393\/input-mobile.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d3404c2-b73c-4e85-af46-968223da8393\/input-mobile.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d3404c2-b73c-4e85-af46-968223da8393\/input-mobile.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d3404c2-b73c-4e85-af46-968223da8393\/input-mobile.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/input-mobile.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d3404c2-b73c-4e85-af46-968223da8393\/input-mobile.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<h3>19. Phone Numbers In RTL Layouts<\/h3>\n<p>When adding a phone number like <code>+ 972-123555777<\/code> in a right-to-left layout, the plus symbol will be positioned at the end of the number. To fix that, reassign the direction of the phone number.<\/p>\n<pre><code>p {\n    direction: ltr;\n}\n<\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/3564b48a-3b11-4dfc-9676-dc7f6175d9be\/phone-number-rtl.png?ssl=1\"><br \/>\n\t\t<img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/phone-number-rtl.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/3564b48a-3b11-4dfc-9676-dc7f6175d9be\/phone-number-rtl.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/3564b48a-3b11-4dfc-9676-dc7f6175d9be\/phone-number-rtl.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/3564b48a-3b11-4dfc-9676-dc7f6175d9be\/phone-number-rtl.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/3564b48a-3b11-4dfc-9676-dc7f6175d9be\/phone-number-rtl.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/phone-number-rtl.png?w=900\" sizes=\"100vw\" alt=\"\"><\/a><figcaption>\n\t\t\t(<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/3564b48a-3b11-4dfc-9676-dc7f6175d9be\/phone-number-rtl.png\">Large preview<\/a>)<br \/>\n\t\t<\/figcaption><\/figure>\n<h3>Conclusion<\/h3>\n<p>All of the issues mentioned here are among the most common ones I\u2019ve faced in my front-end development work. My goal is to keep a list to check regularly while working on a web project.<\/p>\n<p>Do you have an issue that you always face in CSS? Let us know in the comments!<\/p>\n<div>\n  <img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/logo-red-17.png?w=900\" alt=\"Smashing Editorial\"><span>(dm, ra, al, yk, il)<\/span>\n<\/div>\n<\/article>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Common CSS Issues For Front-End Projects Common CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00 When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list&#8230;<a class=\"moretag\" href=\"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/\"> Read the full article&#8230;<\/a><\/p>\n","protected":false},"author":4,"featured_media":57929,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[371],"tags":[],"class_list":["post-57928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-user-experience"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Guest Contribution\"\/>\n\t<meta name=\"keywords\" content=\"user experience\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Common CSS Issues For Front-End Projects | Design for Immersive Technologies\" \/>\n\t\t<meta property=\"og:description\" content=\"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2018-12-28T11:18:54+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-12-28T11:18:54+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Common CSS Issues For Front-End Projects | Design for Immersive Technologies\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#article\",\"name\":\"Common CSS Issues For Front-End Projects | Design for Immersive Technologies\",\"headline\":\"Common CSS Issues For Front-End Projects\",\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/button-and-inputs.png?fit=400%2C265&ssl=1\",\"width\":400,\"height\":265},\"datePublished\":\"2018-12-28T04:18:54-07:00\",\"dateModified\":\"2018-12-28T04:18:54-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#webpage\"},\"articleSection\":\"User Experience\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"position\":2,\"name\":\"User Experience\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#listItem\",\"name\":\"Common CSS Issues For Front-End Projects\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#listItem\",\"position\":3,\"name\":\"Common CSS Issues For Front-End Projects\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/\",\"name\":\"Guest Contribution\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Guest Contribution\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#webpage\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/\",\"name\":\"Common CSS Issues For Front-End Projects | Design for Immersive Technologies\",\"description\":\"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\\u2019ve put together a list of common\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/button-and-inputs.png?fit=400%2C265&ssl=1\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#mainImage\",\"width\":400,\"height\":265},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/12\\\/common-css-issues-for-front-end-projects\\\/#mainImage\"},\"datePublished\":\"2018-12-28T04:18:54-07:00\",\"dateModified\":\"2018-12-28T04:18:54-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Common CSS Issues For Front-End Projects | Design for Immersive Technologies","description":"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common","canonical_url":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/","robots":"max-image-preview:large","keywords":"user experience","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#article","name":"Common CSS Issues For Front-End Projects | Design for Immersive Technologies","headline":"Common CSS Issues For Front-End Projects","author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/button-and-inputs.png?fit=400%2C265&ssl=1","width":400,"height":265},"datePublished":"2018-12-28T04:18:54-07:00","dateModified":"2018-12-28T04:18:54-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#webpage"},"isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#webpage"},"articleSection":"User Experience"},{"@type":"BreadcrumbList","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.taterboy.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","position":2,"name":"User Experience","item":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#listItem","name":"Common CSS Issues For Front-End Projects"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#listItem","position":3,"name":"Common CSS Issues For Front-End Projects","previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}}]},{"@type":"Organization","@id":"https:\/\/www.taterboy.com\/blog\/#organization","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","url":"https:\/\/www.taterboy.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author","url":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/","name":"Guest Contribution","image":{"@type":"ImageObject","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g","width":96,"height":96,"caption":"Guest Contribution"}},{"@type":"WebPage","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#webpage","url":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/","name":"Common CSS Issues For Front-End Projects | Design for Immersive Technologies","description":"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#breadcrumblist"},"author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"creator":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/button-and-inputs.png?fit=400%2C265&ssl=1","@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#mainImage","width":400,"height":265},"primaryImageOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/#mainImage"},"datePublished":"2018-12-28T04:18:54-07:00","dateModified":"2018-12-28T04:18:54-07:00"},{"@type":"WebSite","@id":"https:\/\/www.taterboy.com\/blog\/#website","url":"https:\/\/www.taterboy.com\/blog\/","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","og:type":"article","og:title":"Common CSS Issues For Front-End Projects | Design for Immersive Technologies","og:description":"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common","og:url":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/","article:published_time":"2018-12-28T11:18:54+00:00","article:modified_time":"2018-12-28T11:18:54+00:00","twitter:card":"summary","twitter:title":"Common CSS Issues For Front-End Projects | Design for Immersive Technologies","twitter:description":"Common CSS Issues For Front-End ProjectsCommon CSS Issues For Front-End Projects Ahmad Shadeed 2018-12-27T13:30:11+01:002018-12-28T09:58:20+00:00When implementing a user interface in a browser, it\u2019s good to minimize those differences and issues wherever you can, so that the UI is predictable. Keeping track of all of those differences is hard, so I\u2019ve put together a list of common"},"aioseo_meta_data":{"post_id":"57928","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2021-02-07 23:34:43","updated":"2026-08-22 10:45:03","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/\" title=\"User Experience\">User Experience<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCommon CSS Issues For Front-End Projects\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.taterboy.com\/blog"},{"label":"User Experience","link":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/"},{"label":"Common CSS Issues For Front-End Projects","link":"https:\/\/www.taterboy.com\/blog\/2018\/12\/common-css-issues-for-front-end-projects\/"}],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8wzr5-f4k","jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2018\/12\/button-and-inputs.png?fit=400%2C265&ssl=1","_links":{"self":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/57928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/comments?post=57928"}],"version-history":[{"count":0,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/57928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media\/57929"}],"wp:attachment":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media?parent=57928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/categories?post=57928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/tags?post=57928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}