How to make a background image fit the whole window using CSS?

The following piece of code will solve the problem:

background: url(‘../images/black_bg.png’) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
-ms-background-size: cover;
background-size: cover;




Adding a placeholder to the select tag in HTML5

There is no placeholder attribute for the select tag. But there is a way around it. The following piece of code will help you solve the issue.

HTML Snippet:

<select name=”browsers” required>

<option value=”” disabled selected>Choose a Browser</option>
<option value=”chrome”>CHROME</option>
<option value=”safari”>SAFARI</option>
<option value=”opera”>OPERA</option>



select:required:invalid {
color: #999;
option[value=””][disabled] {
display: none;
option {
color: #000;



Centering an Image in CSS

I have been working with some designs and I had to center an image in few pages. Previously I used to use <center> tag around the image tag and it works like a charm. But the <center> tag is deprecated in HTML5 and there is a beautiful way around to do this using CSS. Add the following code to make the image aligned exactly to the center of any web page.

margin-left: auto;
margin-right: auto;
text-align: center;

This piece of code works like a charm.



Dots and plus signs don’t matter!

Hello everyone,

I recently discovered some little known ways to use your gmail address that can give you greater control over inbox and save you some time and headache. When you choose a gmail address, you can actually get more than just “yourusername@gmail.com”. Here are two different ways you can modify your gmail address and still get your mail:

  •  Append a plus “+” sign and any combination of words or numbers after your email address. For example, if your name was mrprogrammer@gmail.com, you could send mail to mrprogrammer+fun@gmail.com or mrprogrammer+code@gmail.com.
  • Insert one or several dots “.” anywhere in your email address. Gmail doesn’t recognize periods as characters in addresses – we just ignore them. For example, you could tell people your address was mrprogrammer@gmail.com, mr.programmer@gmail.com or mr.prog.ram.mer@gmail.com. You will receive an email at all variations with dots.

For me, the real value in being able to manipulate your email address is that it makes it really easy to filter on those variants. For example you could use mrprogrammer+python@gmail.com when you sign up for python language tutorials or mailing lists and then set up a filter to automatically star, archive or label email addresses to mrprogrammer+python. You can also use this when you register for a service and think they might share your information. For example, I added “+way2sms” when I signed up to use free messaging service once, and now when I see mails from other advertising groups to that address, I know how they got it.
Solution : filtered to auto-delete.

This really makes life easy and thanks to Google to make such a service.



How to filter emails with attachments on Gmail?


We might run into cases where we have to find only the emails which contain attachments. How do we find them quickly on Gmail? Just type “has: attachment” to your query in the search bar of Gmail. Boom – it will pull up emails with attachments, so you don’t have to wade through a sea of empty messages.

A simple hack isn’t it? A real time saver!



How to undo sent messages on Gmail?


Sometimes, it is possible that you might send a dirty e-mail to your dad instead of sending it to your girl friend 😛 That would be definitely a potential embarrassing email. So, it would be obviously awesome if we do have an option to undo that action. How can we do that? Its quite simple: Just log into your gmail account. Go to Settings, [For total noobs, it is the gear icon on the right hand side of the page: select settings from the drop down menu]. By default you will be on the General settings tab. Click on the the “Labs” tab and then scroll down until you see the “Undo Send” by Yuzo F. It will be in disable mode by default. Please choose the enable radio button to enable and press Save Changes. Go back to inbox, just refresh the page and done, there you go you have your life saving feature enabled.

How it works?

After sending a message, a yellow bar will appear at the top of your Gmail saying “Your message has been sent” and will offer you the option to “undo” or “view message “. If you click on “undo”, your message turns back into a draft. But be swift – the option will only hang around for a few seconds!

PS: What is Google Labs? — “The Labs section is where the creators test out new or interesting features, which could change, break or disappear at any time.”