Jump to content

Recommended Posts

Posted

Hello All,

 

On a home page I have a Div with in a Div to create a watermark behind some text.

 

I use:-

 

<div id="content">

 

<div class="blockCenter">

<!-- Watermark on 1st Page -->

 

I tried to code a background image in "blockCenter" but it doesn't show up.

 

My CSS is:-

 

div.blockCenter {

width: 70%;

top: 500px;

border: 0px dotted #CCC;

margin-left: auto;

margin-right: auto;

clear: both;

background: url("../images/") no-repeat 100% 100% #A4D5FE;

}

 

I would like the image to appear as a watermark behind the text beginning with 'Our mission is to . .'

 

Any ideas will be greatly appreciated.

 

My temp URL is http://www.btinternet.com/~gj.d/bits/index.html

 

Thank you as always.

 

 

Best wishes

Graeme

Posted (edited)

Your online page has the styles:-

div.block, div.blockDistinct, div.blockCenter {
    padding: 10px;
    padding-bottom: 3px;
    padding-top: 8px;
}
div.blockDistinct {
    background: url("../images/") no-repeat 100% 100% #A4D5FE;
}
div.blockCenter {
    width: 70%;
 top: 500px;
 border: 0px dotted #CCC;
 margin-left: auto;
    margin-right: auto;
 clear: both;
}

 

relating to div.blockCenter and there is no background-image coded.

 

It should show if you add the code correctly:-

 

div.block, div.blockDistinct, div.blockCenter {
    padding: 10px;
    padding-bottom: 3px;
    padding-top: 8px;
}
div.blockDistinct {
    background: url("../images/") no-repeat 100% 100% #A4D5FE;
}
div.blockCenter {
    width: 70%;
 top: 500px;
 border: 0px dotted #CCC;
 margin-left: auto;
    margin-right: auto;
 clear: both;
background: #A4D5FE url(../images/image.jpg) no-repeat 0 0;
}

 

You coded the url without an image filename in your post; you don't need to put it inside "..." and 100% 100% for the position will put it at the very bottom right corner of the div, if that's what you want. 0 0 or 0% 0% or top left will position it at the top left of the div.

 

../images is the path to go up one directory/folder and then down into the images folder/directory.

 

The #A4D5FE background color should be coded before the background image, although that doesn't usually make any difference.

Edited by Wickham
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...