Do you find you’re sometimes designing or building out pages and wish you could start off with a template that has a proven conversion track record? Here is something for you. GoodUI Fastforward is a set of our best performing UI page templates with a sharp focus on conversion.

Now keep in mind that we’re continuously striving towards making the templates better as we learn from running a/b tests on an ongoing basis. When it comes to conversion, we continuously tweak and improve and therefore the pages within contain a change history on the second page of the PDF.

Of course we also understand that one size does not fit all and so we also offer each page type in flexible and editable formats such as: Balsamiq, Illustrator and Axure.

Speed up your design process and get GoodUI Fastforward where you’ll receive a full year’s worth of updates to all current and future page types. We have coherent pages which help you raise metrics such as: sales, trials, quotes, etc.

Get GoodUI Fastforward

Credits: Jakub Linowski

Website speed is crucial for developing the best user experience possible, because, well, no one likes to wait for web pages to load.

One of the simplest ways for improving the performance of a site is by serving page dependencies like JavaScript libraries and CSS frameworks via a public content delivery network (CDN).

A public CDN is a web service that hosts and serves open source projects used for web development (e.g. jQuery, AngularJS, and Bootstrap). Public CDNs allow websites to use their services for free.

Here are the best public CDNs for web development.

jsDelivr

jsDelivr

With over 1,000 open source projects hosted on jsDelivr, it’s currently one of your most comprehensive options. jsDelivr relies on a couple of reputable CDN companies — CloudFront as the primary and MaxCDN as the failover — which ensures great service uptimes. jsDelivr is an open source project.

cdnjs

cdnjs

Another extensive public CDN is cdnjs, which has a little over 900 open source resources conveniently listed all in one page. Tip: See their list of plugins and extensions on GitHub to find useful tools related to the service — for example, there’s CDNJS for WordPress, a plugin for quickly implementing cdnjs-hosted projects on WP sites.

Microsoft Ajax Content Delivery Network

Microsoft Ajax Content Delivery Network

Many people outside of the ASP.NET development community don’t know that Microsoft has a public CDN. Among the open source projects on Microsoft’s Ajax CDN are jQuery, Bootstrap, and Respond.js. Compared to your other choices, Microsoft’s list of available open source projects is sparse, but what you do get is the peace of mind that comes from using a service maintained by a well-established, 39-year-old tech company.

Open Source Software CDN (OSSCDN)

Open Source Software CDN

This CDN is an open source project by MaxCDN and is powered by jsDelivr. The difference between OSSCDN and jsDelivr, besides the user interface and project ownership, is that MaxCDN, which is jsDelivr’s failover/backup CDN, is the primary content delivery network.

Google Hosted Libraries

Google Hosted Libraries

Google is a leader in the realm of website speed and performance. But not to be a company satisfied by just talking the talk; they also walk the walk by maintaining a public CDN that hosts popular JavaScript frameworks such as AngularJS, jQuery, and even older ones like MooTools and Prototype.

Project-specific CDNs

Some open source projects have their own CDNs. Here’s a couple of popular ones.

Bootstrap CDN

Bootstrap CDN

This public CDN can be used to serve Bootstrap core, as well as Font Awesome and Bootswatch.

jQuery CDN

jQuery CDN

The jQuery project has its own CDN for serving various versions of jQuery and its related projects (jQuery UI, Qunit, etc.).

Why Use a Public CDN?

Performance

Content delivery networks, in general, can reduce your page response times because they are able serve resources from multiple geographic locations, lowering the distance the data has to travel to reach the user.

Compared to multipurpose web servers, like the ones used by shared web hosting providers, CDNs also have optimized backend technology specifically for sending out static page resources such as images, JS files, stylesheets, and so forth.

Ease of use and maintenance

It’s a hassle to upload and update open source libraries on your server. With public CDNs, all you have to do is reference your dependencies and they will just work.

And, if you were away on vacation or aren’t keeping up with project updates as much as you should, you have little to worry about because the public CDN will likely update the files they’re serving.

Reliability

The public CDNs in this list are backed by major tech companies, giving you a bit of assurance with regards to their trustworthiness and service performance.

Higher cached probability

Because public CDNs are used by many websites, there’s a bigger chance that the user coming to your site already has a resource stored in their browser, further improving your page response times.

It’s free

In my definition of what a "public CDN" is, the service should have no fees and should be accessible by anyone, just like Gmail or Dropbox.

Related Content

About the Author

Jacob Gube is the founder of Six Revisions. He’s a front-end web developer by profession. If you’d like to connect with him, head on over to the contact page or follow him on Twitter: @sixrevisions.

The post A List of Free Public CDNs for Web Developers appeared first on Six Revisions.

Website speed is crucial for developing the best user experience possible, because, well, no one likes to wait for web pages to load.

One of the simplest ways for improving the performance of a site is by serving page dependencies like JavaScript libraries and CSS frameworks via a public content delivery network (CDN).

A public CDN is a web service that hosts and serves open source projects used for web development (e.g. jQuery, AngularJS, and Bootstrap). Public CDNs allow websites to use their services for free.

Here are the best public CDNs for web development.

jsDelivr

jsDelivr

With over 1,000 open source projects hosted on jsDelivr, it’s currently one of your most comprehensive options. jsDelivr relies on a couple of reputable CDN companies — CloudFront as the primary and MaxCDN as the failover — which ensures great service uptimes. jsDelivr is an open source project.

cdnjs

cdnjs

Another extensive public CDN is cdnjs, which has a little over 900 open source resources conveniently listed all in one page. Tip: See their list of plugins and extensions on GitHub to find useful tools related to the service — for example, there’s CDNJS for WordPress, a plugin for quickly implementing cdnjs-hosted projects on WP sites.

Microsoft Ajax Content Delivery Network

Microsoft Ajax Content Delivery Network

Many people outside of the ASP.NET development community don’t know that Microsoft has a public CDN. Among the open source projects on Microsoft’s Ajax CDN are jQuery, Bootstrap, and Respond.js. Compared to your other choices, Microsoft’s list of available open source projects is sparse, but what you do get is the peace of mind that comes from using a service maintained by a well-established, 39-year-old tech company.

Open Source Software CDN (OSSCDN)

Open Source Software CDN

This CDN is an open source project by MaxCDN and is powered by jsDelivr. The difference between OSSCDN and jsDelivr, besides the user interface and project ownership, is that MaxCDN, which is jsDelivr’s failover/backup CDN, is the primary content delivery network.

Google Hosted Libraries

Google Hosted Libraries

Google is a leader in the realm of website speed and performance. But not to be a company satisfied by just talking the talk; they also walk the walk by maintaining a public CDN that hosts popular JavaScript frameworks such as AngularJS, jQuery, and even older ones like MooTools and Prototype.

Project-specific CDNs

Some open source projects have their own CDNs. Here’s a couple of popular ones.

Bootstrap CDN

Bootstrap CDN

This public CDN can be used to serve Bootstrap core, as well as Font Awesome and Bootswatch.

jQuery CDN

jQuery CDN

The jQuery project has its own CDN for serving various versions of jQuery and its related projects (jQuery UI, Qunit, etc.).

Why Use a Public CDN?

Performance

Content delivery networks, in general, can reduce your page response times because they are able serve resources from multiple geographic locations, lowering the distance the data has to travel to reach the user.

Compared to multipurpose web servers, like the ones used by shared web hosting providers, CDNs also have optimized backend technology specifically for sending out static page resources such as images, JS files, stylesheets, and so forth.

Ease of use and maintenance

It’s a hassle to upload and update open source libraries on your server. With public CDNs, all you have to do is reference your dependencies and they will just work.

And, if you were away on vacation or aren’t keeping up with project updates as much as you should, you have little to worry about because the public CDN will likely update the files they’re serving.

Reliability

The public CDNs in this list are backed by major tech companies, giving you a bit of assurance with regards to their trustworthiness and service performance.

Higher cached probability

Because public CDNs are used by many websites, there’s a bigger chance that the user coming to your site already has a resource stored in their browser, further improving your page response times.

It’s free

In my definition of what a "public CDN" is, the service should have no fees and should be accessible by anyone, just like Gmail or Dropbox.

Related Content

About the Author

Jacob Gube is the founder of Six Revisions. He’s a front-end web developer by profession. If you’d like to connect with him, head on over to the contact page or follow him on Twitter: @sixrevisions.

The post A List of Free Public CDNs for Web Developers appeared first on Six Revisions.

Website speed is crucial for developing the best user experience possible, because, well, no one likes to wait for web pages to load.

One of the simplest ways for improving the performance of a site is by serving page dependencies like JavaScript libraries and CSS frameworks via a public content delivery network (CDN).

A public CDN is a web service that hosts and serves open source projects used for web development (e.g. jQuery, AngularJS, and Bootstrap). Public CDNs allow websites to use their services for free.

Here are the best public CDNs for web development.

jsDelivr

jsDelivr

With over 1,000 open source projects hosted on jsDelivr, it’s currently one of your most comprehensive options. jsDelivr relies on a couple of reputable CDN companies — CloudFront as the primary and MaxCDN as the failover — which ensures great service uptimes. jsDelivr is an open source project.

cdnjs

cdnjs

Another extensive public CDN is cdnjs, which has a little over 900 open source resources conveniently listed all in one page. Tip: See their list of plugins and extensions on GitHub to find useful tools related to the service — for example, there’s CDNJS for WordPress, a plugin for quickly implementing cdnjs-hosted projects on WP sites.

Microsoft Ajax Content Delivery Network

Microsoft Ajax Content Delivery Network

Many people outside of the ASP.NET development community don’t know that Microsoft has a public CDN. Among the open source projects on Microsoft’s Ajax CDN are jQuery, Bootstrap, and Respond.js. Compared to your other choices, Microsoft’s list of available open source projects is sparse, but what you do get is the peace of mind that comes from using a service maintained by a well-established, 39-year-old tech company.

Open Source Software CDN (OSSCDN)

Open Source Software CDN

This CDN is an open source project by MaxCDN and is powered by jsDelivr. The difference between OSSCDN and jsDelivr, besides the user interface and project ownership, is that MaxCDN, which is jsDelivr’s failover/backup CDN, is the primary content delivery network.

Google Hosted Libraries

Google Hosted Libraries

Google is a leader in the realm of website speed and performance. But not to be a company satisfied by just talking the talk; they also walk the walk by maintaining a public CDN that hosts popular JavaScript frameworks such as AngularJS, jQuery, and even older ones like MooTools and Prototype.

Project-specific CDNs

Some open source projects have their own CDNs. Here’s a couple of popular ones.

Bootstrap CDN

Bootstrap CDN

This public CDN can be used to serve Bootstrap core, as well as Font Awesome and Bootswatch.

jQuery CDN

jQuery CDN

The jQuery project has its own CDN for serving various versions of jQuery and its related projects (jQuery UI, Qunit, etc.).

Why Use a Public CDN?

Performance

Content delivery networks, in general, can reduce your page response times because they are able serve resources from multiple geographic locations, lowering the distance the data has to travel to reach the user.

Compared to multipurpose web servers, like the ones used by shared web hosting providers, CDNs also have optimized backend technology specifically for sending out static page resources such as images, JS files, stylesheets, and so forth.

Ease of use and maintenance

It’s a hassle to upload and update open source libraries on your server. With public CDNs, all you have to do is reference your dependencies and they will just work.

And, if you were away on vacation or aren’t keeping up with project updates as much as you should, you have little to worry about because the public CDN will likely update the files they’re serving.

Reliability

The public CDNs in this list are backed by major tech companies, giving you a bit of assurance with regards to their trustworthiness and service performance.

Higher cached probability

Because public CDNs are used by many websites, there’s a bigger chance that the user coming to your site already has a resource stored in their browser, further improving your page response times.

It’s free

In my definition of what a "public CDN" is, the service should have no fees and should be accessible by anyone, just like Gmail or Dropbox.

Related Content

About the Author

Jacob Gube is the founder of Six Revisions. He’s a front-end web developer by profession. If you’d like to connect with him, head on over to the contact page or follow him on Twitter: @sixrevisions.

The post A List of Free Public CDNs for Web Developers appeared first on Six Revisions.

A fixed navigation bar, also referred to as a "sticky" navigation bar, is a toolbar that stays in place while the user is scrolling the web page.

It’s a commonly-used site navigation design pattern for displaying a site’s main navigation menu, as well as other essential interface components such as a search box, social media buttons, and notifications. The design pattern guarantees that important interface components are easily viewable and accessible regardless of where the user currently is on a web page.

In this tutorial, I’ll walk you through a simple CSS technique for implementing a top horizontal fixed navigation bar.

Examples

Before we get started with the tutorial, it’s probably best if we look at some sites that have fixed navigation bars, just to make sure we’re on the same page, and to show you practical applications of the design pattern.

Below are some examples of actual sites.

Niice has a fixed navigation bar that contains a search box and the site’s navigation menu. While you’re browsing designs for inspiration, you can rapidly filter them with minimal interruption to your experience simply by using the search box at the top of your screen.

An animated GIF demonstrating the fixed navigation bar on the website, Niice.

99U, an online publication, has a fixed navigation bar where the site’s navigation menu is seated. This gives users convenient access to the site’s menu at any point in the reading experience.

Animated GIF showing the fixed navigation bar on the website, 99U.

The Forbes.com site employs a fixed navigation bar to make its menu, search feature, and login widget available anywhere in the reading experience. The fixed navigation bar helps people quickly jump to another article after they have completed reading the current article. The fixed navigation bar can have the potential to reduce bounce rates because users are constantly given a menu of other articles to read.

An example of a fixed navigation bar on Forbes.com

As shown in the examples above, the navigation design pattern works well on web pages that have a lot of stuff.

A fixed navigation bar is a good way of minimizing the delay and interruption caused by switching to a new task (searching the site, logging in, or moving to other sections of the site). The design pattern, in essence, enhances usability through the application of Fitts’ Law.

Creating a Fixed Navigation Bar

Now that we’ve looked at a handful of real-world applications for the fixed navigation bar design pattern, as well as briefly discussing how it can enhance usability, I’ll now show you a quick and easy implementation method that only requires HTML and CSS.

Here’s a demo page that you may want to explore and review first.

Screenshot of a fixed navigation bar demo page.

View Demo

Download Source from GitHub

View GitHub Repository

HTML

The markup required is very minimal, just a block-level element that will hold the contents of the fixed navigation bar.

<nav class="fixed-nav-bar">
  <!-- Fixed navigation bar content -->
</nav>

For semantics and enhanced interoperability-potential with third-party web services, like search engine robots interested in finding and understanding your website’s IA, a nav element is a good option here. The nav element also happens to be a block-level element by default, which saves us a line of CSS (icing on the cake).

However, if you’d rather not use the nav element, any block-level element will do, whether it’s a natural block-level element like a div or an inline element such as a span that’s assigned a display: block CSS property/value.

CSS

Here’s the style rule that makes the fixed navigation bar stay in place.

.fixed-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 50px;
  background-color: #00a087;
}

Earlier, we gave our HTML element a class attribute of fixed-nav-bar so that we can apply the above style rule to it.

The last three properties (width, height, and background-color) are variable; change their values according to your needs.

Let’s talk about the four key CSS properties responsible for the magic in greater detail.

position: fixed;

Giving the position property a value of fixed positions the bar relative to the viewport. This property declaration allows the bar to stay put even when the user is scrolling the document.

top: 0;
left: 0;
right: 0;

Setting the top, left, and right properties to 0 avoids unintended margins/padding at the top and the sides of the fixed navigation bar.

Tip: If you’d rather have a fixed bar that’s persistently at the bottom of the viewport, which is another common design pattern, simply change top: 0 to bottom: 0.

z-index: 9999;

An unusually high z-index value is used to significantly reduce the possibility that an HTML element is rendered on top of the fixed navigation bar, as long as there are no other z-index values higher than 9999.

That’s all there is to it.

Note

In the demo, there’s also a very rudimentary CSS-only responsive navigation menu. This menu is only a proof-of-concept, and it’s not production-ready. Since the focus of this tutorial is on building a fixed navigation bar, which can hold different types of menus and other interface components, I won’t be discussing that portion of the demo. I’ll just let you explore the source code if you’d like to see how that part of the demo works (if you’re having trouble or if you have questions about it, just send me a tweet and I’ll be happy to help out).

Wrapping Up

A fixed navigation bar is simple to implement. It requires minimal HTML markup and only a few CSS properties that you’re already familiar with.

The method discussed in this tutorial has excellent browser compatibility because it only uses tried-and-true CSS, and can thus be rendered properly even in some of the most ancient web browsers. However, if backwards-compatibility is important to your projects, then you may decide to replace the nav element (which is an HTML5 element) to a div.

In the proper context, a fixed navigation bar can improve usability and UX because it reduces the delay between switching to a new task. It therefore increases the affordance of the UI components within it, compared to the traditional top horizontal navigation bar that requires scrolling back up to the top of the web page.

Related Content

About the Author

Jacob Gube is the founder of Six Revisions. He’s a front-end web developer by profession. If you’d like to connect with him, head on over to the contact page or follow him on Twitter: @sixrevisions.

The post How to Create a Fixed Navigation Bar appeared first on Six Revisions.

A fixed navigation bar, also referred to as a "sticky" navigation bar, is a toolbar that stays in place while the user is scrolling the web page.

It’s a commonly-used site navigation design pattern for displaying a site’s main navigation menu, as well as other essential interface components such as a search box, social media buttons, and notifications. The design pattern guarantees that important interface components are easily viewable and accessible regardless of where the user currently is on a web page.

In this tutorial, I’ll walk you through a simple CSS technique for implementing a top horizontal fixed navigation bar.

Examples

Before we get started with the tutorial, it’s probably best if we look at some sites that have fixed navigation bars, just to make sure we’re on the same page, and to show you practical applications of the design pattern.

Below are some examples of actual sites.

Niice has a fixed navigation bar that contains a search box and the site’s navigation menu. While you’re browsing designs for inspiration, you can rapidly filter them with minimal interruption to your experience simply by using the search box at the top of your screen.

An animated GIF demonstrating the fixed navigation bar on the website, Niice.

99U, an online publication, has a fixed navigation bar where the site’s navigation menu is seated. This gives users convenient access to the site’s menu at any point in the reading experience.

Animated GIF showing the fixed navigation bar on the website, 99U.

The Forbes.com site employs a fixed navigation bar to make its menu, search feature, and login widget available anywhere in the reading experience. The fixed navigation bar helps people quickly jump to another article after they have completed reading the current article. The fixed navigation bar can have the potential to reduce bounce rates because users are constantly given a menu of other articles to read.

An example of a fixed navigation bar on Forbes.com

As shown in the examples above, the navigation design pattern works well on web pages that have a lot of stuff.

A fixed navigation bar is a good way of minimizing the delay and interruption caused by switching to a new task (searching the site, logging in, or moving to other sections of the site). The design pattern, in essence, enhances usability through the application of Fitts’ Law.

Creating a Fixed Navigation Bar

Now that we’ve looked at a handful of real-world applications for the fixed navigation bar design pattern, as well as briefly discussing how it can enhance usability, I’ll now show you a quick and easy implementation method that only requires HTML and CSS.

Here’s a demo page that you may want to explore and review first.

Screenshot of a fixed navigation bar demo page.

View Demo

Download Source from GitHub

View GitHub Repository

HTML

The markup required is very minimal, just a block-level element that will hold the contents of the fixed navigation bar.

<nav class="fixed-nav-bar">
  <!-- Fixed navigation bar content -->
</nav>

For semantics and enhanced interoperability-potential with third-party web services, like search engine robots interested in finding and understanding your website’s IA, a nav element is a good option here. The nav element also happens to be a block-level element by default, which saves us a line of CSS (icing on the cake).

However, if you’d rather not use the nav element, any block-level element will do, whether it’s a natural block-level element like a div or an inline element such as a span that’s assigned a display: block CSS property/value.

CSS

Here’s the style rule that makes the fixed navigation bar stay in place.

.fixed-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 50px;
  background-color: #00a087;
}

Earlier, we gave our HTML element a class attribute of fixed-nav-bar so that we can apply the above style rule to it.

The last three properties (width, height, and background-color) are variable; change their values according to your needs.

Let’s talk about the four key CSS properties responsible for the magic in greater detail.

position: fixed;

Giving the position property a value of fixed positions the bar relative to the viewport. This property declaration allows the bar to stay put even when the user is scrolling the document.

top: 0;
left: 0;
right: 0;

Setting the top, left, and right properties to 0 avoids unintended margins/padding at the top and the sides of the fixed navigation bar.

Tip: If you’d rather have a fixed bar that’s persistently at the bottom of the viewport, which is another common design pattern, simply change top: 0 to bottom: 0.

z-index: 9999;

An unusually high z-index value is used to significantly reduce the possibility that an HTML element is rendered on top of the fixed navigation bar, as long as there are no other z-index values higher than 9999.

That’s all there is to it.

Note

In the demo, there’s also a very rudimentary CSS-only responsive navigation menu. This menu is only a proof-of-concept, and it’s not production-ready. Since the focus of this tutorial is on building a fixed navigation bar, which can hold different types of menus and other interface components, I won’t be discussing that portion of the demo. I’ll just let you explore the source code if you’d like to see how that part of the demo works (if you’re having trouble or if you have questions about it, just send me a tweet and I’ll be happy to help out).

Wrapping Up

A fixed navigation bar is simple to implement. It requires minimal HTML markup and only a few CSS properties that you’re already familiar with.

The method discussed in this tutorial has excellent browser compatibility because it only uses tried-and-true CSS, and can thus be rendered properly even in some of the most ancient web browsers. However, if backwards-compatibility is important to your projects, then you may decide to replace the nav element (which is an HTML5 element) to a div.

In the proper context, a fixed navigation bar can improve usability and UX because it reduces the delay between switching to a new task. It therefore increases the affordance of the UI components within it, compared to the traditional top horizontal navigation bar that requires scrolling back up to the top of the web page.

Related Content

About the Author

Jacob Gube is the founder of Six Revisions. He’s a front-end web developer by profession. If you’d like to connect with him, head on over to the contact page or follow him on Twitter: @sixrevisions.

The post How to Create a Fixed Navigation Bar appeared first on Six Revisions.

A fixed navigation bar, also referred to as a "sticky" navigation bar, is a toolbar that stays in place while the user is scrolling the web page.

It’s a commonly-used site navigation design pattern for displaying a site’s main navigation menu, as well as other essential interface components such as a search box, social media buttons, and notifications. The design pattern guarantees that important interface components are easily viewable and accessible regardless of where the user currently is on a web page.

In this tutorial, I’ll walk you through a simple CSS technique for implementing a top horizontal fixed navigation bar.

Examples

Before we get started with the tutorial, it’s probably best if we look at some sites that have fixed navigation bars, just to make sure we’re on the same page, and to show you practical applications of the design pattern.

Below are some examples of actual sites.

Niice has a fixed navigation bar that contains a search box and the site’s navigation menu. While you’re browsing designs for inspiration, you can rapidly filter them with minimal interruption to your experience simply by using the search box at the top of your screen.

An animated GIF demonstrating the fixed navigation bar on the website, Niice.

99U, an online publication, has a fixed navigation bar where the site’s navigation menu is seated. This gives users convenient access to the site’s menu at any point in the reading experience.

Animated GIF showing the fixed navigation bar on the website, 99U.

The Forbes.com site employs a fixed navigation bar to make its menu, search feature, and login widget available anywhere in the reading experience. The fixed navigation bar helps people quickly jump to another article after they have completed reading the current article. The fixed navigation bar can have the potential to reduce bounce rates because users are constantly given a menu of other articles to read.

An example of a fixed navigation bar on Forbes.com

As shown in the examples above, the navigation design pattern works well on web pages that have a lot of stuff.

A fixed navigation bar is a good way of minimizing the delay and interruption caused by switching to a new task (searching the site, logging in, or moving to other sections of the site). The design pattern, in essence, enhances usability through the application of Fitts’ Law.

Creating a Fixed Navigation Bar

Now that we’ve looked at a handful of real-world applications for the fixed navigation bar design pattern, as well as briefly discussing how it can enhance usability, I’ll now show you a quick and easy implementation method that only requires HTML and CSS.

Here’s a demo page that you may want to explore and review first.

Screenshot of a fixed navigation bar demo page.

View Demo

Download Source from GitHub

View GitHub Repository

HTML

The markup required is very minimal, just a block-level element that will hold the contents of the fixed navigation bar.

<nav class="fixed-nav-bar">
  <!-- Fixed navigation bar content -->
</nav>

For semantics and enhanced interoperability-potential with third-party web services, like search engine robots interested in finding and understanding your website’s IA, a nav element is a good option here. The nav element also happens to be a block-level element by default, which saves us a line of CSS (icing on the cake).

However, if you’d rather not use the nav element, any block-level element will do, whether it’s a natural block-level element like a div or an inline element such as a span that’s assigned a display: block CSS property/value.

CSS

Here’s the style rule that makes the fixed navigation bar stay in place.

.fixed-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 50px;
  background-color: #00a087;
}

Earlier, we gave our HTML element a class attribute of fixed-nav-bar so that we can apply the above style rule to it.

The last three properties (width, height, and background-color) are variable; change their values according to your needs.

Let’s talk about the four key CSS properties responsible for the magic in greater detail.

position: fixed;

Giving the position property a value of fixed positions the bar relative to the viewport. This property declaration allows the bar to stay put even when the user is scrolling the document.

top: 0;
left: 0;
right: 0;

Setting the top, left, and right properties to 0 avoids unintended margins/padding at the top and the sides of the fixed navigation bar.

Tip: If you’d rather have a fixed bar that’s persistently at the bottom of the viewport, which is another common design pattern, simply change top: 0 to bottom: 0.

z-index: 9999;

An unusually high z-index value is used to significantly reduce the possibility that an HTML element is rendered on top of the fixed navigation bar, as long as there are no other z-index values higher than 9999.

That’s all there is to it.

Note

In the demo, there’s also a very rudimentary CSS-only responsive navigation menu. This menu is only a proof-of-concept, and it’s not production-ready. Since the focus of this tutorial is on building a fixed navigation bar, which can hold different types of menus and other interface components, I won’t be discussing that portion of the demo. I’ll just let you explore the source code if you’d like to see how that part of the demo works (if you’re having trouble or if you have questions about it, just send me a tweet and I’ll be happy to help out).

Wrapping Up

A fixed navigation bar is simple to implement. It requires minimal HTML markup and only a few CSS properties that you’re already familiar with.

The method discussed in this tutorial has excellent browser compatibility because it only uses tried-and-true CSS, and can thus be rendered properly even in some of the most ancient web browsers. However, if backwards-compatibility is important to your projects, then you may decide to replace the nav element (which is an HTML5 element) to a div.

In the proper context, a fixed navigation bar can improve usability and UX because it reduces the delay between switching to a new task. It therefore increases the affordance of the UI components within it, compared to the traditional top horizontal navigation bar that requires scrolling back up to the top of the web page.

Related Content

About the Author

Jacob Gube is the founder of Six Revisions. He’s a front-end web developer by profession. If you’d like to connect with him, head on over to the contact page or follow him on Twitter: @sixrevisions.

The post How to Create a Fixed Navigation Bar appeared first on Six Revisions.

Google Maps launched in 2005 and it was a revolution: you could go to your desktop browser, click and drag a map with a mouse and watch it render smoothly and quickly. Before then, you usually had to click arrows at the edge of a map in order to pan it, and wait for it to load.

Google Maps’ ‘fishbone’ zoom controls predominated the map; after all, screen resolutions were small, and double-clicking the map would re-centre it rather than zoom into it. Beside the map, a column of suggested searches and instructions took over one third of the screen’s width. Oh, and it only worked in Firefox and Explorer browsers.

Only eight years later, Google Maps spans multiple browsers and operating systems on desktop, mobile, tablet, and wearable devices. But how did its latest reincarnation come into play?

Learn some of the design foundations that fuelled Maps’ latest evolution.

Google Maps Design Secrets Revealed

At our startup, Typeform, we have just shifted our entire web/UI design process from Photoshop and Fireworks over to Sketch. Based on our collective first-hand experiences, we’d like to discuss some of the app’s features that help us get our design work done more efficiently.

It gets CSS

At our company, we mainly use visual design software for web/UI design. This means that we almost always need to be able to convert a static design prototype to HTML and CSS. With Sketch, we’ve found this process to be incredibly easy.

The developers of Sketch created the app with CSS in mind. Everything you can do in the app can be reproduced using current CSS specifications. In Sketch, there’s no crazy, undoable visual effect that will make front-end developers hate you, just the ones you can actually write using CSS.

Also, obtaining the style rules for a specific element, such as a login button for example, is as easy as right-clicking on it and selecting "Copy CSS Attributes".

Vector graphics

Everything you create in Sketch is a vector element. Because of this, you can scale them without worrying about pixelation. This is particularly handy when exporting assets for @2x displays, such as Apple’s Retina screens, as well as when you’re working with SVG. The fact that this digital design tool is vector-based is also very helpful for responsive design.

Accurate font rendering for the Web

It’s annoying when you design an awesome interface in Photoshop, port it over to CSS/HTML, and then discover that the fonts look completely different compared to how PS showed it to you. Typography is key to the user experience, and therefore a correct representation in your web design tool is important in the design process.

One thing we’ve found with Sketch is that font-rendering is very close to how it would be on a web/mobile browser, meaning that we quickly know off-the-bat how everything will look together without having to cobble together a high-fidelity prototype.

iOS design testing

When designing our new site, we knew that it needed to look great on mobile. We’ve all done the standard tricks for testing designs in different viewport sizes such as manually resizing the browser window or using a Chrome extension to resize the viewport to match an iPhone or Nexus. But Sketch has something special for these responsive-design-testing occasions: A companion app called Sketch Mirror.

Sketch Mirror runs on iOS devices, and mirrors exactly what you see on the canvas on your Mac to all the nearby devices that have the app open. It’s great for testing your design on a series of devices all at the same time. (It would be even better if there was an Android version of Sketch Mirror.)

Symbols

If you use a design element repetitively, then making it a symbol is more efficient and improves consistency across a project.

A symbol links all the instances of a design element together. If you change one instance of the symbol, all instances you have made can be updated to reflect the change. This feature ultimately means no more searching through all your design files and layers for that "Share" button you want to tweak.

Symbols are very similar to Smart Objects in Photoshop, and this is no coincidence. The Symbols feature was originally created as a plugin for the app to bring Smart-Object-like features to Sketch. With the launch of Sketch 3.0, Symbols was brought into the core app.

Artboards and Pages

We used to have dozens of files littering our shared folders every time we were designing a new screen or component.

Since we’ve moved to Sketch, we can keep everything related to the same design or feature in the same file.

You can split Sketch’s infinite canvas up into smaller artboards, each with a unique size. We’ve found this useful when designing for a range of differently-sized devices, like when we need to know how our website will look on a 1080p display and an iPhone.

Besides artboards, you can also add pages to a Sketch file. We used this feature to split out each screen design for our new site onto a new page, keeping everything neatly organized.

Grid and Smart Guides

How could we ever live without Sketch’s Grids and Smart Guides?

First, let’s talk about grids. We all know we should use them to help us line up our design elements and get consistent spacing, but they can be such a pain to set up in our previous software.

In Sketch, however, it’s a trivial affair to set up your custom grid lines. Customizing your grid settings is easy, just go to the "View" menu. Now you have no excuse not to use grids.

And Smart Guides? They make aligning objects effortless. If you’ve ever used Keynote, you’ll be familiar with them. They tell you when an object lines up with another, and your object will snap to them as it moves.

It’s worth noting that a recent update has enhanced the Smart Guide functionality in Photoshop as well.

Small file size

For people used to the multi-gigabyte file sizes we’d seen with Photoshop, it was definitely a surprise when we found most of our designs coming in at under 100MB. The amount of money we’ll save in file storage alone makes it worth switching!

Passionate community

The people involved around Sketch are just brilliant; they always come out with something new that enhances the app, or teach you something you didn’t know.

Like Photoshop, there are some great plugins and tools that have been created by the Sketch community. One we use is Dynamic button plug-in for Sketch.app that’s useful when you need to make lots of UI buttons; as you edit the text of a button, other properties automatically adjust to keep a consistent border around the text, rounded corners, etc. Check out this list of open source Sketch plugins to get an idea of what community-developed plugins are currently available.

The community is also passionate about sharing knowledge about Sketch. There are tons of video tutorials and guides on how to get more out of Sketch, which was valuable when we made the switch.

Downside to Sketch

One drawback for a great deal of digital designers is the fact that Sketch is an Apple-centric app: It only works on Mac OS X (and Sketch Mirror only works on iOS).

Our design team primarily uses Mac OS, so for us this wasn’t an issue. But for many, this will be the ultimate deal breaker.

Do you use Sketch?

If you’re already using Sketch, or thinking of switching over, please share your experiences and thoughts in the comments.

Related Content

About the Author

David Okuniev is a UI/UX designer turned entrepreneur. He was born in Belgium, raised in England, and currently living in Barcelona where he founded Typeform.

The post Why Sketch is Ideal for Web Designers appeared first on Six Revisions.

I can still remember how excited I was back in 2008 when I first discovered WordPress (late-adopter, I know).

What was particularly impressive for me was that I could change the designs of my WordPress sites with minimal effort.

And so the hunt for the perfect theme began!

As far as I can recall, there weren’t that many paid/premium themes back then. And, to be honest, I wasn’t even taking the possibility of paying for a theme into consideration (since money was a bit tight) so I was kind of stuck with free themes by default.

All was well for a while. My test sites and personal blogs were running just fine, until, one day, I noticed some strange links in the footer.

Those unusual links pointed not only to the theme creator’s site, but also to some questionable sites that had spammy anchor texts like "pay day loan", "cheap home insurance", "seo services", and so forth.

No problem, I thought, removing these should only take a minute.

But, to my surprise, those links were neither in the theme’s Widgets screen nor anywhere in the theme’s source code.

I searched all of the theme’s files in bulk with a source code editor, looking for those anchor texts.

I even went through the database using a SQL SELECT statement.

Nothing.

So how was it possible for these links to remain under the radar?

Well, as it turns out, this is the story of my first encounter with encrypted code in WordPress themes.

Shady WordPress theme practices

Encrypted code is just one piece of the puzzle; there are other distasteful WordPress theme development practices going on.

Static links pointing to suspicious websites

Not all static links (or embedded links) in WordPress themes are bad.

A lot of times, they are just links that acknowledge the developer of the theme. As long as the links are decent, and granted that the theme user is informed that the links will be displayed on their site, then they might be alright.

However, in some instances, they may be going to spammy websites. When links start pointing to casino sites, online pharmacies or some shady biz-op products, all without the site owner’s knowledge, then it’s a different story.

Search engines simply won’t be pleased to find out that your site is linking to the dark side of the internet, and they may penalize you for it even if you’re an unwitting participant.

Theme-locking

Some links and code blocks in shady WordPress themes are "locked in" with JavaScript and/or PHP. Removing these links or code blocks will make the entire WordPress site go blank, displacing your content with a message telling you that you need to put the links/code blocks back in place to be able to remove the message from your site.

Encrypted code

Encrypted code is a term in the WordPress community for code snippets that are purposely being obfuscated from the user of the theme. The intent of encrypted code is to hide portions of the theme’s source code and to make these portions difficult to remove. Encrypted code can do a variety of things, such as generating links to third-party sites and interfering with the user experience.

Why these things are happening

Some companies go out of their way to include harmful elements in their WordPress themes.

Why would they do this? You might ask. Because WordPress themes are a great online marketing tool.

The market for themes keeps growing year over year. It’s been reported that 18.9 percent of all sites are built with WordPress. And, at one point, all those site owners will go out looking for nice themes.

The way some people capitalize on this opportunity is by creating a great-looking WordPress theme and then including hidden links and obfuscated code in the theme.

Imagine what their reach could be like if they get even a few hundred domains installing their theme.

How to make sure you’re using a trustworthy theme

If you’re considering the use of a new WordPress theme, below are some steps that can help you stay out of trouble.

Of course, the first best option is to use a theme obtained from a reputable source and created by a trustworthy theme developer, both of which can significantly reduce the potential of these shady practices being employed. It wouldn’t hurt to go through these steps despite the reputation of your candidate theme.

Step 1: Install theme-checking plugins

It is very possible to investigate every theme by hand just by going through its files. But doing so with a trusty plugin is much quicker, and potentially more thorough.

You’ll need two plugins for this step.

  1. TAC scans all of your installed WordPress themes for potentially malicious code.
  2. Theme-Check tests your themes for compliance with all the latest WordPress standards and best practices.

Step 2: Test the theme for encrypted code

Before activating a WordPress theme, you should first test it in a safe development environment. One such environment is on your PC. However, if you don’t have time for that, you should still be fine as long as you don’t activate the theme before running your tests.

To see what the TAC plugin has to say about your new theme, in the WordPress administration screen, go to Appearance > TAC.

Scroll down to your theme to see if there are any issues.

Screenshot of a TAC test result.

If TAC says that everything’s fine (and you’re using a theme from a trusted source) then it probably is.

However, if it indicates the presence of any encrypted code then you need to be cautious.

It’s recommended to never use themes that have encrypted code. The main reason for this is that you have absolutely no control over what’s inside the encrypted block of code. It could be anything: third-party scripts, data-mining, ads, link-building schemes, etc.

Some PHP and JavaScript functions associated with encrypted code are designed to help developers perform difficult but benign processes, such as data-encoding conversion or parsing. But in the wrong hands, and in the context of WordPress theme development, they are often used to hide shady source code.

If you want to do some sniffing around on your own, you can batch-search theme files with a text editor like Notepad++. Look for the keyword "base64_decode".

The base64_decode() PHP function, together with the eval() function, is commonly used to execute encrypted code.

For example, if the encrypted code you find looks anything like this (just an example, not actual code) stay away:

$o="eHQvamF2YXNjcmlwdCI+PC9zY3JpcHQ+";
eval(base64_decode("PHNjcmlwdCBzcmM9Ii8vYS1zaGFkeS1zaXRlLmNvbS9qcy9zcGFtbGlua3MuanMiIHR5cGU9InRl" . $o));

Step 3: Evaluate all the static links

TAC will also let you know when it stumbles upon any static links inside the theme. When you click the Details button, you will see the exact files and lines where those links occur.

Find embedded static links with TAC.

Static links are common in free WordPress themes, and they’re not necessarily bad. For instance, some themes require attribution. The first thing you should do is decide whether or not you’re okay with those links being on your site. In the end, if you’re not okay with any link, you just shouldn’t use the theme.

When it comes to static links, most of the time the party’s going on in the footer.php file.

For instance, the theme I checked when doing research for this piece had links pointing to a site titled "Botox Tel Aviv" with an anchor text consisting entirely of non-Latin characters:

An example of an embedded static link in a WordPress theme.

For testing purposes, you can check what happens if you remove an embedded link. Sometimes, you will discover that your entire site will stop working as a result of this action. And that is exactly what happened to my test site; when I removed the link, the site stopped working and the content was replaced with this message:

The message being displayed on all pages when a static link is removed.

If you want to investigate some more, this is where the other plugin, Theme-Check, comes into play.

Go to Appearance > Theme Check and run a test for the theme in question. Most likely, the plugin will report a lot of stuff, so you will have to browse around for a while to find what might be causing the problems.

In my case, the instructions found in line 124 of the functions.php file were to blame:

Theme-check finding a WordPress theme error.

Conclusion

The moral of the story is that you should choose WordPress themes carefully. Before using any theme, it’s best to perform some research and testing on it.

Related Content

About the Author

Karol K is a blogger who’s passionate about WordPress. He works with ThemeIsle, a WordPress theme development company. His work has been published all over the Web, on sites like Web Design Ledger, Quick Sprout, ProBlogger, and others. Reach him at @carlosinho.

The post How to Make Sure You’re Not Using a Shady WordPress Theme appeared first on Six Revisions.

Powered by WP Robot