Putting an Image as a Background

A plain, solid color page isn’t very appealing most of the time. In order to do something different you could make an image your webpage background instead of a color.

The image is called upon in the body tag:

and its as easy as that. BUT WAIT THERE’S MORE!

Since pictures typically have different colors in them it can be tricky to put text over them. There’s a solution for that too.


tags (and some in-line css) you can add borders around different area’s of text.

for example you would enter:

your text goes here

This would display a green colored box behind the text. The box would be 40 pixels high and 155 pixels wide. You have to play with the height and width usually to get it to fit perfectly behind your text, and you can also change the color of it by changing the hex code.

If you want to add multiple areas of text with something behind it then you need to add multiple

tags with the in-line css for each box you want.

to see what it looks like you can go to my site pitt.edu/~jdk65

-Josh Kreidler


~ by jkreids on September 24, 2012.

One Response to “Putting an Image as a Background”

  1. […] Leave a Reply Cancel reply […]

Comments are closed.