Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
|
You would be best to use CSS.
You can apply the image to your body tag like so:
Code:
body {
background #fff url('/path/to/image.jpg') no-repeat 50% 0;
}
You can either put this is a CSS file and include it into your HTML file:
HTML Code:
<link href="style.css" rel="stylesheet" type="text/css">
or place it withing <style type="text/css"></style> tags in your head section:
HTML Code:
<style type="text/css">
body {
background #fff url('/path/to/image.jpg') no-repeat 50% 0;
}
</style>
This is the full declaration for the background property, if you would rather keep it to "standard" and not shorthand you will need to apply each part seperatly:
Code:
body {
background-color: #fff;
background-image: url('/path/to/image.jpg');
background-position: 50% 0;
background-repeat: no-repeat;
}
As you can see, the best method is the shorter one.
__________________
Please login or register to view this content. Registration is FREE
Learn professional skills from professional people, from $6.50 a month.
|