Writing text over a background image

I looked at similar questions, but I was still stuck.

I am writing a website in ASP using MSVWD10. For just 1 page, I want to have an image of 960x700 pixels in size, on which text will be displayed on top of it. This text will change frequently. I tried to set this in CSS, but the image seems to duplicate itself.

Here is the CSS.

#about 
{
    background: url(img/about.jpg) no-repeat 0 0;
    text-align: center;
    background-color: #888888;
    width: 960px;
    min-height: 685px;
    position: relative;
    margin: auto; 
}

Do I need to set div on content page?

+3
source share
1 answer

Something like this should start:

HTML

<div id="outer"><div id="inner">Some text</div></div>

CSS

#outer{background:#ff0022;Text-align:center;width:200px;min-height:200px;}
#inner{margin:auto;}

You can see it in action here: http://jsfiddle.net/rvn5M/

+2
source

All Articles