John Rawsterne

design and illustration

Using Wallpaper Patterns in CSS

  • Apr 5, 09:24 PM

Want to know how to jazz up your websites with some funky seamless patterns? This article is gonna show you how easy it is to do just that.

Ok, the first thing we need is some HTML:

HTML

<html>
<head>
<title>Fun and games with wallpaper</title>
<link rel="stylesheet" type="text/css" media="screen" href="CSS_wallpaper.css" />
</head>
<body>
	<div id="container">         
	<p>Dontcha just love those seamless patterns :)</p>
	</div>
</body>
</html> 

Then we need a sprinkling of CSS...

CSS

body {
font: 62.5%/1.5 Tahoma, Verdana, Arial, sans-serif;
background: url(images/wallpaper1.gif);
color:#333;
text-align:center;
}

#container {
background:#fff;
width:700px;
margin:0 auto;
padding:5em 0;
}

And there you go… click here to have a look at a live demo.

tags: , , ,

Search 'n Stuff

Enter some search text, click the button, and as if by magic, mysterious search results will appear. Give it a whirl, you know you wanna...

RSS and ATOM feeds

RSS and ATOM journal feeds

Visit StockXpert