Michael Jancen-Widmer Michael Jancen-Widmer - 1 year ago 94
CSS Question

Color in top bar in mobile version of chrome

I am wondering how a website like changes the color of the top bar in chrome.

This is a screenshot

Here -at the top - you can see that the polyvore navigation color (black) is also set as the color from the chrome navigation(where the link is). How is this made with css? Thanks in advance!

Answer Source

Starting in version 39 of Chrome for Android on Lollipop, you’ll now be able to use the theme-color meta tag to set the toolbar color—this means no more Seattle gray toolbars! The syntax is pretty simple: add a meta tag to your page’s <head> with the name="theme-color", and set the content to any valid CSS color.

Screenshot of phone showing theme-color

For example, to set the background to your favorite color or HTML5Rocks orange:

<meta name="theme-color" content="#db5945">

In addition, Chrome will show beautiful high-res favicons when they’re provided. Chrome for Android picks the highest res icon that you provide, and we recommend providing a 192×192px PNG file. For example:

<link rel="icon" sizes="192x192" href="nice-highres.png">

Check out the theme-color here on HTML5Rocks as well as on the Web Fundamentals site, and be sure to check out the Add to home screen docs for more ways to make your site stand out.

Source : https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download