Skip to main content

How To Create Ghost Button or Hollow Button

Creating smart button for a website becomes most popular web design trend now a days. These buttons are so designed that it is referred as Ghost Button or Hollow Button because of their transparent and emptiness. Read also : How to protect your computer from wannaCry ransomware virus.

What is Ghost Button

Ghost buttons are the transparent and empty buttons as well as clickable items with no fill and a simple outline that have some basic shape form such as rectangular or square. These buttons are sometimes referred as Hollow buttons because of its emptiness. Generally these buttons are bordered by very thin line and internal section consist of plain text printed in light colour mostly black / white.

Ghost buttons are semi transparent or completely transparent asides from the outline and text and hence the name “ghost" comes. Ghost buttons are quite popular on pages that use full-screen photography and it seemed to evolve from Apple when they redesigned iOS7. Read also : How to make money online from home.

Creating Ghost Buttons

To create ghost buttons you must have knowledge of html and css. Here I will show how to create ghost buttons with css. But before we begin you might like to see the below image of some sites that uses ghost buttons.





HTML Markup

To create ghost button, here we need only anchor tag i.e, opening <a> and closing tag</a> to link text and a class within it.

<a class="ghost button" href="page url goes here"> Your text goes here </a>

Cascading Style Sheets (CSS)

There are seven different ways to style ghost buttons.
  • Basic ghost button
  • Rounded corners ghost button
  • Thick border ghost button
  • Border color fade ghost button 
  • Full color fade ghost button
  • Size transition effect ghost button
  • Semi-transparent fade ghost button

Basic Ghost Button

At first we need to create some foundational CSS codes that make anchor element i.e, <a> look like ghost element. Read also : How to setup AdSense page level ads.

.ghost-button {
display: inline-block;
width: 200px;
padding: 8px;
color: #fff;
border: 1px solid #fff;
text-align: center;
outline: none;
text-decoration: none;
}


There should be visual indication whenever a user hovers the ghost button and it can be achieved by creating style rules for the hover and active states using the :hover and :active pseudo classes.

.ghost-button:hover,
.ghost-button:active {
background-color: #fff;
color: #000;
}


NB : You can modify the width, padding and color according to you.

Rounded Corner Ghost Button

To create rounded corner ghost button you need to add the border-radius property in the above Basic Ghost Button CSS codes. After adding this property the Basic Ghost Button CSS codes becomes like below codes. Read also : How to make money from Flipkart.

.ghost-button-rounded-corners {
display: inline-block;
width: 200px;
padding: 8px;
color: #fff;
border: 1px solid #fff;

border-radius: 5px;
text-align: center;
outline: none;
text-decoration: none;
}
.ghost-button-rounded-corners:hover;
.ghost-button-rounded-corners:active {
background-color: #fff;
color: #000;
}


Thick Border Ghost Button

Thick border ghost button can be achieved by adding font-weight property and increasing the border property from 1px to say 2px, 3px in the CSS codes

.ghost-button-thick-border {
display: inline-block;
width: 200px;
padding: 8px;

font-weight: bold;
color: #fff;
border:
1px solid #fff;
text-align: center;
outline: none;
text-decoration: none;
}
.ghost-button-thick-border:hover,
.ghost-button-thick-border:active
background-color: #fff;
color: #000;
}


Border Color Fade Ghost Button

It is one of the most popular transition effect in most ghost buttons. Fading the border and the text color to another color can be achieved using the CSS transitionproperty. Read also : How to make money from Amazon.

.ghost-button-border-fade {
  display: inline-block;
  width: 200px;
  padding: 8px;
  color: #fff;
  border: 2px solid #fff;
  text-align: center;
  outline: none;
  text-decoration: none;

transition: border-color 0.3s ease-out, color 0.3s ease-out;
}
 .ghost-button-border-fade: hover,
 .ghost-button-border-fade:active {
 border-color: #66d8ed;
color: #66d8ed;

 transition: border-color 0.3s ease-in,  color 0.3s ease-in;
}


Full Color Fade Ghost Button

It is the another popular transition effect in some ghost buttons. Here the border color, text color and background color can be faded in another color using the CSS transition property and background-color property.

.ghost-button-full-color-fade {
display: inline-block;
width: 200px;
padding: 8px;
color: #fff;

background-color: transparent;
border: 2px solid #fff;
text-align: center;
outline: none;
text-decoration: none;

transition: border-color 0.3s ease-out,
                    color 0.3s ease-out,
                    background-color 0.3s ease-out,
}
.ghost-button-full-color-fade: hover,
.ghost-button-full-color-fade: active {
border-color: #374f5b;
color: #fff;
background-color: #668898;

transition: border-color 0.3s ease-in,
                    color 0.3s ease-in,
                    background-color 0.3s ease-in
}


Semi Transparent Fade Ghost Button

It is one of another variant ghost buttons. To make ghost buttons are more interesting, here we allow some of the background image to show through the button when a user hovers over it and this can be achieved by using the rgba() function with 20% opacity rgba(255, 255, 255, 0.2); in the :hover and :active style rule. Since the rgba() function is not supported by all browsers thats why here we have to declare solid color as fallbacks. Read also : How to setup custom AdSense search engine.

.ghost-button-semi-transparent-fade {
display: inline-block;
width: 200px;
padding: 8px;
color: #fff;
border: 2px solid #fff;
text-align: center;
outline: none;
text-decoration: none;

  transition: border-color 0.3s ease-out,
                     background-color 0.3s ease-out;
}
.ghost-button-semi-transparent-fade : hover
.ghost-button-semi-transparent-fade : active {
border-color: #fff; /* fallback */
border-color: rgba(255, 255, 255,
0.2);
background-color: #fff; /* fallback */
background-color: rgba(255, 255, 255,
0.2);
transition: border-color 0.3s ease-in,
background-color 0.3s ease-in;
}


Size Transition Effect Ghost Button

This type of ghost buttons can be made by expanding its size whenever a user hovers over it and we can achieve this effect in ghost buttons by increasing the width, height and line-height value in the :hover and :active style rule.

.ghost-button-size-transition {
display: inline-block;
width: 200px;
height: 25px;
line-height: 25px;
margin: 0 auto;
padding: 8px;
color: #fff;
border: 2px solid #fff;
text-align: center;
outline: none;
text-decoration: none;
transition: width 0.3s ease-out,
                     height 0.3s ease-out,
                     line-height 0.3s ease-out;
}
.ghost-button-size-transition:hover,
.ghost-button-size-transition:active {
width: 210px;
height: 35px;
line-height: 35px;
transition: width 0.1s ease-in,
                      height 0.1s ease-in,
                      line-height 0.1s ease-in;
}


Thanks for reading. Please share the post and your views on the same.



Recommended Post
Big on Hosting. Unlimited Space & Unlimited Bandwidth

Comments

Post a Comment

Popular posts from this blog

How To Change Default File Download Path in UC Browser

All of us known that UC browser is the most popular, fast and less data consuming mobile browser for android devices. Many of us use UC browser on daily basis on our smart phones. By default UC browser has download path to internal memory device which is /storage/sdcard0/download. sdcard0 is the built in memory or internal memory of your device. Read also : How to fix HTTP and HTTPS Mixed Content Errors.

Do you know that this default download path can be changed? Since, internal memory is fixed, and once you exceed this value you can't download more. You need to move some data from mobile memory to the external memory which is sdcard1. If you change this default path to external memory card (sdcard1), you can download more data directly to your desired directory. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Here, I will show you, how to change this default download path from internal memory card sdcard0 to external memory card sdcard1. To do so you need to…

Calculation of Total Marks, Percentage, Division, Remarks, Maximum & Minimum Number of Students in MS Excel

In this post, I will help you to learn how to calculate total marks, percentage, division, maximum number, minimum number and remarks of students of a class very fast. At first you need to look over the above image very carefully. The above image shows the marks obtained by six students of a class.

Formula to calculate Total Marks of all students within seconds 

First you need to find out the Total Mark of a single student who is on the top of the list i.e, Mani. To calculate Total Mark of Mani, click on the Total Mark cell address of Mani i.e, H6 and then type the formula =sum(1st subject's cell address i.e, b6:last subject's cell address i.e, g6) and then press Enter on the keyboard or click anywhere on the worksheet. Here b6 and g6 are cell address of 1st subject (English) and last subject (Biology) of that student. Read also : How to Enable HTTPS for Blogger Blog.

After getting results, click on the resultant cell address of Total Mark of the 1st student i.e., Mani an…

How To Rename A WhatsApp Group

We all know that WhatsApp is the most popular messaging service for Android, BlackBerry, iPhone and for other platforms. In this post, I will show you how to rename an existing WhatsApp group. To rename an existing WhatsApp group your smartphone must have internet connection. After that you need to follow the below steps. Read also : How to track lost/stolen mobile phone and erase data remotely.


Step 1. Open WhatsApp application on your smartphone.

Step 2. After that you need to click CHATS tab and click on your group name.



Step 3. Once you click on your group name, you will able to see chat details. Now you need to click vertical dots located extremely top right corner and then click Group info. Read also : How to setup AdSense page level ads.


Step 4. Now you can easily rename your group. To rename the group just click Edit icon and then type the desired group name and click OK. Read also : How to protect your computer from WannaCry ransomware virus.


In this way you can rename a What…

Change UC Browser Default Homepage in Android Phones

We all know that Android OS operated Smartphones and Tablets are great for web browsing. Like other browsers, uc browser has a default search engine Yahoo is set for web search. UC browser provides different kind of search facilities under 5 different categories namely Web, Video, Shop, Image and APP. Read also : How to protect your computer from WannaCry ransomware virus.

In this post, I will show you how to change the default search engines of uc browser in Android devices for their 5 different categories. To do so you just need to follow the below steps. Read also : How to Enable HTTPS for Blogger Blog.

Change Default Homepage for UC Web search

Step 1. At first you need to open UC browser
Step 2. After that click Search. Follow the below image.


Step 3. Once you click Search, you will able to see the default search engine's icon for Web search like y for Yahoo, g for Google. Now you need to click that search icon. Follow the below image. Read also : How to change UC browser defaul…

Enable Auto Save Forms & Passwords in UC Browser

Many of you use UC browser on daily basis on your smart phone but very less enable this feature. Enabling auto save forms and passwords allows the browser to remember the username and passwords. It gives you relief from entering username & password every time whenever you login to your email. Did you enable auto saving form & password? If not, then do it now. Read also : How to track lost/stolen mobile phone and erase data remotely.

In this post, I will show you how to enable auto save forms & password in UC browser in your Android phones. To do so you need to follow the below steps.

Steps to enable auto save forms and passwords

Step 1. At first open UC browser

Step 2. In the second step, tap on the horizontal bar.


On the next image, you will able to see Bookmarks, History, Refresh etc. icons. Now swipe this menu screen to the left and tap Settings. Read also : How to create custom AdSense Search Engine and make money from it.


Step 3.  Now on the Browser Settings, you w…

Best Video Calling App For 2G, 3G, 4G and Wi-Fi Network

More or less every mobile subscriber wishes to chat with their contacts by seeing his/her infront of them. Now a days video calling becomes more popular in urban areas rather than rural areas. After the invention of 3G network it becomes a trend to chat with loved one through video calling. Read also : How to protect your computer from WannaCry ransomware virus.

But what happened if you have 2G network instead of 3G or 4G. Could you be able to chat with your loved one by seeing him on 2G network? There is a good news for those who wishes to see their friends or family members on mobile screen when they talk to them. There are many application software available on internet which provides video calling facility even on 2G network. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Although there are many video calling applications are available, among them my recommendation is IMO. Because IMO provides fast, free and high quality video calling facility to its members…

How To Delete / Deactivate / Reactivate a Pinterest Account

Pinterest is one of the best social network since it allows users to create boards and also to update boards with images. But what if you want to delete your pinterest account? Pinterest allows users to delete their accounts permanently or deactivate their accounts so that whenever a user like to come back easily can reactivate his/her account. So be sure what do you want? Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Do you want to delete your account permanently or deactivate your account? Keep in mind that by deactivating your Pinterest account, your profile and boards will not be visible on Pinterest also your twitter and facebook profiles will be unliked, if you had connected them earlier.

Steps to Delete/Deactivate Pinterest Account

Step 1: At first log in to your Pinterest account with your user name and password. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Step 2: Click on your username locating right side at the top of the ho…