Forum Moderators: not2easy
I want to place a background image onto the centre of my pages so that its like a watermark below my images and text. I have written the following code without any success...
body {
background-color : #fff;
background-image:url('fade.gif');
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center center;
margin : 0;
padding : 0;
border-color : #cc0000;
}
As the image is centred I can actually see it when I remove my content div which has the value of background-color:transparent; and Ive also tried background-color:inherit; but the content div still obstructs the image.
Could someone kindly steer me in the right direction
thanks in advance
Css_Novice
The content div has only a half of content so I can actually see half of the watermark image. Strangely enough, Im able to change the b/g color to whatever I want, but the values; transparent or inherit make no changes at all
Child:
<body>
<div id="content">
...
</div>
</body>
Other container:
<body>
<div id="container">
<div id="content">
...
</div></div></body>
If there is another container in between, content could be inheriting the background from it.
<html>
<head><title>Main</title>
<style type="text/css">
#header {height:80px; background-color:#000; margin:auto:}
body {
background: #c8c8c8 url(fade.gif) center center no-repeat;
background-color : #fff;
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center center;
margin : 0;
padding : 0;
color : #000000;
}
p, ul, ol, li {
font : 8pt verdana,geneva,helvetica;
}
h1 {
font : bold 14pt Arial, Helvetica, geneva;
}
h2 {
font : bold 12pt Arial, Helvetica, geneva;
}
#leftnavigation {
position : absolute;
left : 0;
width : 20%;
margin-left : 10px;
margin-top : 20px;
color : #000000;
padding : 3px;
}
#rightnavigation {
position : absolute;
left : 77%;
top : 80px;
width : 190px;
padding-left : 2px;
z-index : 3;
color : #000000;
padding : 3px;
border-bottom: 1px dashed #ccc;
}
#content {
background-color:transparent;
top : 0px;
margin : 0px 25% 0 240px;
padding : 0 8px 8px 8px;
color : #000000;
width : 60%;
height:100%;
border : 1px solid #ccc;
}
#content h1, #content h2 {
color : #cc0000;
}
div#footer {width:100%; /* makes the div fill its container - usually body */
padding:4px 0; /* pushes the links away from top and bottom of the div */
font-size:.65em; /* sets the font size of all links */
text-align:center; /* centers the ul elements in the div */
background-color:#000080; /* sets the background color of the div */
clear:both;
}
A {
color: #000080;font-size: 7pt;font-style: bold;font-family: verdana;}
A:Hover {
color: #ff6600;
text-decoration:underline;
}
A {text-decoration:none
}
</style>
</head>
<body>
<div id="header">
</div>
<div id="leftnavigation">
</div>
<div id="rightnavigation">
</div>
<div id="footer">
</div>
</body>
</html>
I needed a tabular structure for that specific text within the div and only realised after I had deleted the tables and pasted in other content...
My apologies - Another lesson learnt I guess, thanks for your input guys...