{"id":24997,"date":"2015-10-30T23:01:44","date_gmt":"2015-10-30T15:01:44","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=24997"},"modified":"2020-06-29T16:13:18","modified_gmt":"2020-06-29T08:13:18","slug":"css-tricks-more","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/","title":{"rendered":"10 (More) CSS Tricks You Probably Overlooked"},"content":{"rendered":"<p>There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are <a href=\"https:\/\/www.hongkiat.com\/blog\/useful-css-tricks-you-might-have-overlooked\/\">CSS tricks<\/a> that you can use for things like <a href=\"https:\/\/www.hongkiat.com\/blog\/css-tricks-vertical-align-content\/\">aligning content vertically<\/a> or <a href=\"https:\/\/www.hongkiat.com\/blog\/css3-mix-blend-mode\/\">displaying text on image<\/a>. With CSS being an ever evolving entity, time and time again we stumble upon cool CSS tricks that are fun to know.<\/p>\n<p>In today\u2019s post, I\u2019m introducing you to <strong>10 more CSS attributes and tricks that you might not know<\/strong>.<\/p>\n<p class=\"note\"><strong>Read More:<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/simple-css-snippets\/\">10 Simple & Smart CSS Snippets<\/a><\/p>\n<h2>1. Write Vertically<\/h2>\n<p>There\u2019s a CSS attribute called <code>writing-mode<\/code> that accepts one of these three values; <code>horizontal-tb<\/code>, <code>vertical-rl<\/code> and <code>vertical-lr<\/code>.<\/p>\n<p><code>horizontal-tb<\/code> is the default and it causes the typical left to right horizontal text flow in an element.<\/p>\n<p>The <code>vertical-*<\/code> values however are for vertical block flow, causing text to be written from top to bottom by the browsers. In <code>vertical-rl<\/code>, new lines are added to the left of the previous ones and vice versa for <code>vertical-lr<\/code>.<\/p>\n<p>This is useful for <strong>displaying languages like Chinese and Japanese<\/strong> that are typically written from top to bottom and also for when you wish to display text vertically to save horizontal space, like in table headers.<\/p>\n<p><strong>Note:<\/strong> If you want to control individual letters\u2019 directions, you can use <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/text-orientation\">text-orientation<\/a> turning them upright or sideways, as desired.<\/p>\n<pre> -webkit-writing-mode: vertical-rl;\r\n  -ms-writing-mode: tb-rl;\r\n  writing-mode: vertical-rl;\r\n<\/pre>\n<p><iframe height=\"440\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/JYKaPL\/?height=440&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/JYKaPL\/\" rel=\"nofollow\">writing-mode CSS attribute<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>2. Reuse Color Value<\/h2>\n<p>The keyword <code>currentColor<\/code> carries the value of <code>color<\/code> attribute and can be used in other attributes which accept color values like <code>background<\/code>.<\/p>\n<pre>div{\r\n     background: linear-gradient(90deg, currentColor 50%, black 50%);\r\n     ...\r\n     color: #FFD700;\r\n     \/* currentColor is #FFD700 *\/\r\n  }\r\n<\/pre>\n<p><iframe height=\"408\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/JYKajL\/?height=408&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/JYKajL\/\" rel=\"nofollow\">currentColor CSS Attribute<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>3. Blend Backgrounds<\/h2>\n<p>An element can have more than one background (a background color and multiple background images). The <code>background-blend-mode<\/code> blends all of them together as per the given blending mode. There are a total of <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/blend-mode\">16 blend modes<\/a> at the moment.<\/p>\n<pre>background-blend-mode: difference;\r\n<\/pre>\n<p><iframe height=\"244\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/xwOabY\/?height=244&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/xwOabY\/\" rel=\"nofollow\">background-blend-mode CSS Attribute<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>4. Blend Elements<\/h2>\n<p><a href=\"https:\/\/www.hongkiat.com\/blog\/css3-blend-mode\/\">mix-blend-mode<\/a> blends the contents and backgrounds of overlapping elements. Chrome doesn\u2019t seem to support all of the modes even though Firefox does.<\/p>\n<pre>mix-blend-mode: color;\r\n<\/pre>\n<p>I took two elements, an <code>img<\/code> showing the image of a rose and a <code>span<\/code> with a graphic background, stacked them and applied a few mix-blend-modes.<\/p>\n<p><iframe height=\"399\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/OyXoPK\/?height=399&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/OyXoPK\/\" rel=\"nofollow\">mix-blend-mode CSS Attribute<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>5. Ignore Pointer Events<\/h2>\n<p>You can make an element oblivious to any pointer event by using a single attribute called <code>pointer-events<\/code>. By giving <code>pointer-events<\/code> the value of <code>none<\/code> in an element, this prevents it from being a target to pointer events.  IE11+ support included.<\/p>\n<p>In the following demo, there\u2019s a checkbox beneath two images stacked above each other. Both images carry <code>pointer-events: none<\/code>, allowing us to click the checkbox buried under them. Based on the checked state of the checkbox, the desired image is shown while the other hidden.<\/p>\n<p><iframe height=\"422\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/dYXqog\/?height=422&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/dYXqog\/\" rel=\"nofollow\">pointer-events CSS Attribute<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>6. Decorate Split Boxes<\/h2>\n<p>Typically when a box is split (like when an inline element witnesses line breaks), the edges of the split portions are devoid of any box styles and look sliced. To avoid that, you can use <code>box-decoration-break:clone<\/code>.<\/p>\n<p>Now to follow that up with an example and an early \"Christmas in the horizon\" reminder, here\u2019s a list of Santa\u2019s Reindeer all typed in a single <code>span<\/code>! Ho! Ho! Ho!<\/p>\n<p><strong>Note<\/strong>: Even though modern IE does support <code>box-decoration-break<\/code>, at the edge of the split portion border, rendering isn\u2019t smooth and the background looks sliced. But it does render <code>box-shadow<\/code> nicely, which is why I used box shadows for both border and background. There\u2019s also an absence of horizontal padding in the edges in IE that you may want to fill with spaces.<\/p>\n<p><iframe height=\"257\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/NGrLGG\/?height=257&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/NGrLGG\/\" rel=\"nofollow\">box-decoration-break CSS Attribute<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>7. Collapse Table Elements<\/h2>\n<p><code>visibility: collapse<\/code> is an attribute created just for the table elements, like rows and columns. If used on anything else it\u2019ll behave like <code>visibility: hidden<\/code>. Chrome though treats it like <code>hidden<\/code> even for table elements.<\/p>\n<p>When you assign <code>visibility: collapse<\/code> on a table element , it is hidden and its space is filled by the nearby content \u2013 like how it would behave on using <code>display:none<\/code> instead.<\/p>\n<p>But unlike <code>display:none<\/code> which modifies the table layout after removing the space, the layout remains the same in <code>visibility:collapse<\/code>. You can see how it works in more detail <a href=\"https:\/\/staff.washington.edu\/fmf\/2010\/02\/19\/what-is-visibility-collapse\/#exrow\">over here<\/a>.<\/p>\n<p><iframe height=\"200\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/qONMOK\/?height=200&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/qONMOK\/\" rel=\"nofollow\">visibility: collapse CSS<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>8. Create Columns<\/h2>\n<p>You can create a column layout for your contents using the <code>columns<\/code> attribute. It lets you specify how many columns (<code>column-count<\/code>) and how each column width (<code>column-width<\/code>) are to be rendered in an element.<\/p>\n<p>If the content is other than text, like for example an image, then you\u2019ll have to keep in mind its width respective to the column\u2019s. For the following example, I only used <code>column-count<\/code> to specify how many columns I want.<\/p>\n<pre>-webkit-column-count: 2;\r\n  -moz-column-count: 2;\r\n  column-count: 2;\r\n<\/pre>\n<p><iframe height=\"314\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/RWRYWd\/?height=314&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/RWRYWd\/\" rel=\"nofollow\">column-count CSS<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>9. Make Elements Resizeable<\/h2>\n<p>An element can be made resizeable (vertically, horizontally or both) with the CSS3 attribute <code>resize<\/code> . The resizeability in a <code>textarea<\/code> can be be disabled using the same.<\/p>\n<pre>resize: vertical;\r\nresize: horizontal;\r\nresize: both;\r\nresize: none;\r\n<\/pre>\n<p><iframe height=\"407\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/jbqxza\/?height=407&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/jbqxza\/\" rel=\"nofollow\">CSS Resize<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>\n<h2>10. Create Patterns<\/h2>\n<p>There can be multiple CSS3 gradients (both linear & radial) for a single element and they can be piled on each other to create patterns. This allows us to <strong>create nice backgrounds for elements without using external images<\/strong>. Making it work might require a bit of practice though.<\/p>\n<p><iframe height=\"267\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/rpsthecoder\/embed\/NqeGLY\/?height=267&theme-id=14457&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/rpsthecoder\/pen\/NqeGLY\/\" rel=\"nofollow\">Watermelons CSS gradient<\/a> by Preethi (<a href=\"https:\/\/codepen.io\/\/rpsthecoder\" rel=\"nofollow\">@rpsthecoder<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>.<\/iframe><\/p>","protected":false},"excerpt":{"rendered":"<p>There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like aligning content vertically or displaying text on image. With CSS being an ever evolving entity, time and time again we stumble upon cool CSS tricks that are&hellip;<\/p>\n","protected":false},"author":145,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[507,4501],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>10 (More) CSS Tricks You Probably Overlooked - Hongkiat<\/title>\n<meta name=\"description\" content=\"There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"10 (More) CSS Tricks You Probably Overlooked\" \/>\n<meta property=\"og:description\" content=\"There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-30T15:01:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-29T08:13:18+00:00\" \/>\n<meta name=\"author\" content=\"Preethi Ranjit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Preethi Ranjit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/\"},\"author\":{\"name\":\"Preethi Ranjit\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\"},\"headline\":\"10 (More) CSS Tricks You Probably Overlooked\",\"datePublished\":\"2015-10-30T15:01:44+00:00\",\"dateModified\":\"2020-06-29T08:13:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/\"},\"wordCount\":880,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"CSS\",\"CSS Tutorials\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/\",\"name\":\"10 (More) CSS Tricks You Probably Overlooked - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2015-10-30T15:01:44+00:00\",\"dateModified\":\"2020-06-29T08:13:18+00:00\",\"description\":\"There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-tricks-more\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"10 (More) CSS Tricks You Probably Overlooked\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\",\"name\":\"Preethi Ranjit\",\"description\":\"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/preethi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"10 (More) CSS Tricks You Probably Overlooked - Hongkiat","description":"There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/","og_locale":"en_US","og_type":"article","og_title":"10 (More) CSS Tricks You Probably Overlooked","og_description":"There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like","og_url":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2015-10-30T15:01:44+00:00","article_modified_time":"2020-06-29T08:13:18+00:00","author":"Preethi Ranjit","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Preethi Ranjit","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/"},"author":{"name":"Preethi Ranjit","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3"},"headline":"10 (More) CSS Tricks You Probably Overlooked","datePublished":"2015-10-30T15:01:44+00:00","dateModified":"2020-06-29T08:13:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/"},"wordCount":880,"commentCount":4,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["CSS","CSS Tutorials"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/","url":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/","name":"10 (More) CSS Tricks You Probably Overlooked - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2015-10-30T15:01:44+00:00","dateModified":"2020-06-29T08:13:18+00:00","description":"There are plenty of CSS snippets that web developers can use to achieve certain results, and then there are CSS tricks that you can use for things like","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/css-tricks-more\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"10 (More) CSS Tricks You Probably Overlooked"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3","name":"Preethi Ranjit","description":"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.","url":"https:\/\/www.hongkiat.com\/blog\/author\/preethi\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-6vb","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/24997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=24997"}],"version-history":[{"count":2,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/24997\/revisions"}],"predecessor-version":[{"id":51782,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/24997\/revisions\/51782"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=24997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=24997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=24997"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=24997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}