Back To Top

CSS Tricks

Tricks are for kids......

Here I am going to include sopme cool little snippets of CSS code that I have found usefull and realy like.

Full Size Background Image

Thisi first one is how to make an image always fit your screen. Like a back ground image.
html {
	background: url(images/bg.jpg) no-repeat center center fixed; 
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}
		
The only down side to this one is that the image maintains its ratio. So if it is a different shae than the screen you will only get part of the image. A cool thing about this is that if you zoom in or out the image will stay the same.