Its pretty easy to make some blurry text with CSS. We can do it by just making the text color transparent and adding some text shadow. Here’s the code for the same:
Blurry Text with CSS
To do it on the normal text we can create a class and use SPAN tag to make the text blurry.
Tabbed content is a great way to handle a lot of information on a page without loosing usability and it provides a great user experience as well. Here’s a real easy way to create tabbed content with jQuery and CSS.
I’ve used the latest version of the Google-hosted jQuery library, however, you can always download the script and host it on your server.
Step 2: Write some HTML code
<div >
<ul >
<li data-tab="tab-1">Tab One</li>
<li data-tab="tab-2">Tab Two</li>
<li data-tab="tab-3">Tab Three</li>
<li data-tab="tab-4">Tab Four</li>
</ul>
<div id="tab-1" >
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
<div id="tab-2" >
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div id="tab-3" >
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</div>
<div id="tab-4" >
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div><!-- container -->
In the above code I’ve created an unordered list which will act as tabs and I’ve used a custom attribute named data-tab and set its value to tab-1, tab-2 and so forth. We will use the data-tab attribute in our jQuery script to toggle the “current” class to hide and display our tabs.
Below the unordered list, there are a few DIV elements with ID attribute same as the data-tab attribute we used in the unordered list. This will do all the magic. Before adding the magic script, lets write some CSS to stylise our HTML Unordered list and content panels.
I’ve added “current” class to the first elements and we will play with the current class to stylise the active tabs and toggle the data content div element.
I’ve used display:none for the .tab-content and display:inherit for the “current” tab. This will hide all DIV elements and show the tab with current class only. We will play with the current class to get our tabbed content work with a small magical jQuery code.
You can always change the CSS to have the look and feel similar to your website, use some image backgrounds to make it nice and smooth.
Step 4: Write the magic jQuery code
Now here’s the magic jQuery code which will actually create the tabbed content work.
When the DOM is ready, if a user clicks on any list element of ul.tabs it will grab the data-tab attribute and assign the same to tab_id variable. Then, we will remove the current class from all list elements and our DIV.tab-content elements with the jQuery removeClass attribute. Then we will add the “current” class to the clicked list element and DIV tab with the grabbed data-tab ID.
That’s it, now we have working tabbed content with jQuery and CSS. Try it, share it and let me know of your thoughts in the comments. If you need to add any additional functionality, feel free to ask in the comments.
Links, Links, Links!! That’s what we have all over the internet. On our website and blog posts, we have a lot of links to point a user to another page. Today I will share a small trick to stylize the links with CSS3 Animation. That’s what I’ve used on this website and you can apply the same as well to change the link color with style on hover.
CSS3 Animation
With CSS3 animation, we can add some effects when changing from one style to another without using any flash or javascript. We will use CSS animation transition to add some cool effects to the anchor tags.
How it works
CSS3 transition effects let an element gradually change from one style to another. To do this we must specify two things:
Specify the CSS property we want to add an effect too. Specify the duration of the effect. Optionally we can specify “transition-timing-function” which is set to “ease” by default however, we can use any of these.
Try this code on a blank HTML page and add the CSS either within ... tags or in your stylesheet. Play around a bit with the CSS to understand the CSS3 Animation transition and create some cool effects for your website links and other block-level elements. Feel free to discuss this further in the comments. You can also contact IOGOOS Solution to build Website Animation Services.
Typography is the key element in the design process. While designing a web page, business card, brochure or newspaper advertisement fonts and text style plays an important role to get user attention. To design stunning elements we need fonts and fortunately, the big daddy provides a lot of them for free. We can use Google Web Fonts in our designs and they are pretty awesome and very easy to use.
How to use Google Web Fonts on a web page
It’s pretty easy to use Google Web Fonts on your website. You can do that in just three simple steps:
Choose single or multiple Google Web Font(s) from Google fonts website: //www.google.com/fonts and add them in your collection.
Hit the use link above the list of your selected fonts and Google will show you different methods to include these fonts on your website. Standard, @import or Javascript
I always use Standard method with a small trick to load the fonts before displaying the web page.
Here’s the code you would need to use Google Web Fonts on your website.
I’ve added Open Sans and Lobster fonts to my collection for this example.
<head>
<link href='//fonts.googleapis.com/css?family=Lobster|Open+Sans' rel='stylesheet' type='text/css'>
<!-- This will prefetch content from google web fonts website -->
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
</head>
The above code goes within the [htmltag tag=”code”]<head>…</head>[/htmltag] tags and the DNS-prefetch link tag will fetch the contents from Google Web Fonts website. This will help resolve issues like font changes after the page load.
In the above CSS code, I’ve defined the body font as open sans and headings font as lobster. Similarly, you can use different fonts for different elements.
How to Use Google Web Fonts while Designing?
As a designer, we all need to design the mockups of the creative work before we can publish the same. If we need to use Google Web Fonts while designing layouts in Photoshop or Illustrator we will have to download the font and install the same in our Operating System.
Using Google Web Font Download Link
We can always click the Download link to save the fonts on our hard drive and then install the font on our operating system. However, what will happen if that font is updated and new characters are added or there’s a new and improved version available for that font. We need to keep a check and if the new version is available, we need to uninstall the previous version and then install the new version.
What is there’s some tool which can automatically do this task and save us a lot of time and effort?
Fortunately, there are tools available that can make our life easy and keep Google Web Fonts updated all the time.
Using Skyfonts to Download and Sync Google Fonts
Fonts.com has teamed up with Google to offer google web fonts for desktops via Skyfonts software.
We are proud to have teamed up with Google to offer desktop versions of their popular Google Fonts free of charge. Offered for use in print, these fonts are delivered using SkyFont’s patent-pending font delivery technology and can be used anywhere.
Each time a font is updated — such as when new characters are added — SkyFonts will automatically update the font on your device. Syncing Google Fonts with SkyFonts will also improve your web browsing experience, by cutting the time spent downloading fonts. ~ Fonts.com
Skyfonts software is available for both Mac and Windows. You can choose the fonts you want to use while designing and Skyfonts sync these fonts with your operating system fonts and make them available in all applications as normally installed fonts. If a new version of the installed font is available, the Skyfonts application will automatically sync and replace the older one with the new version.
Download Skyfonts Software
There are other methods available to download all Google Web Fonts on your computer, however, I found Skyfonts the easiest and most efficient to keep all the fonts updated.
You can add the following code in your theme’s functions.php file to change the WordPress excerpt length. Change the number (100) to the desired length.
add_filter('excerpt_length', 'new_excerpt_length');
function new_excerpt_length($length) { return 100; }
While working on multiple projects I always need to copy the current path of a directory in Terminal. I used to use the command pwd in the terminal that prints the current directory path in the terminal and then I have to select the path with the mouse to copy and paste the same where I needed.
I hate to use the mouse as it wastes a lot of time and to save time and copy the current path without selecting it with the mouse, I found this command and use it all the time.
pwd | pbcopy
This command will copy the current directory path to the clipboard and we can then press CMD+V (CTRL+V for Windows) to paste the path wherever needed.
I hope this will help someone save time and be more productive.+
In each PHP website, we need to find out the current URL of the page, and here’s the PHP code to find out the current URL of the page a user is browsing with or without the query string.
Recently I was updating my plugins on my local server and somehow the page got refreshed and my WordPress installation got stuck at the following message:
“Briefly unavailable for scheduled maintenance. Check back in a minute.”
You can easily bypass this message via the following steps:
On your local or web server, browse to the main installation (root) directory for WordPress.
On local if you have enabled hidden files, you will need to enable hidden files.
You will see a file named .maintenance in the root directory.
Simply delete this file to bypass the above mentioned message and you can access your WordPress dashboard and site as you normally do.
You can choose to perform the upgrades again and make sure the page should not get refreshed. If it does again follow the step again.
Explore IOGOOS uitmate WordPress Development Services
Here’s a code snippet to flatten or merge a multidimensional array. This is useful when we need to find if a value exists in any of the nodes in a multidimensional array.
I use this function in my Paid Content Packages WordPress Plugin to find out if any of the packages have any page or post assigned.
PHP Function:
function flattenArray($arrayToFlatten) {
$flatArray = array();
foreach($arrayToFlatten as $element) {
if (is_array($element)) {
$flatArray = array_merge($flatArray, flattenArray($element));
} else {
$flatArray[] = $element;
}
}
return $flatArray;
}
There are shorter versions of this function available, however, I like to use code that is clear and easy to read. Hope this helps you if you are finding a solution to this.