Creating a web page that’s a single background image

Asked By 0 points N/A Posted on -
qa-featured

How can I create a web page that's  a single background image and not a tiled background one?

SHARE
Best Answer by limasler
Best Answer
Best Answer
Answered By 15 points N/A #114819

Creating a web page that’s a single background image

qa-featured

 

Hi Maxene,

It is very easy to add background image to a web page. There are two methods to do that.

1.        Use the background property of the body section. Here is the how to do that.

<html>
<body background="back.gif">
<h1>Background Image</h1>
<h1>How to use background images</h1>
</body>
</html>

Make sure the back.gif file exists

2.       Use a css rule to control the body background image. Using css you can add more control to the background. Here are the steps to do that.

<html>
<body>
<head>
<style type="text/css">
body{
    background:url(back.gif);background-repeat:repeat-x;
}
</style>
</head>
<h1>Background Image</h1>
<h1>How to use background images</h1>
</body>
</html>

Using css you can control the background repeat options easily.

Hope this is helpful

Answered By 0 points N/A #114820

Creating a web page that’s a single background image

qa-featured

 

There is only one way to use single background image for one page i.e. using CSS because simply HTML background attribute does not support any alignment and HTML do not support background attribute

<html>
<body>
<head>
<style type="text/css">
body{

    background-image: url('a.jpeg');

    background-repeat: no-repeat;

}

</style>

</head>
<body>
</body>
</html>

 

 

Related Questions