Forum Moderators: not2easy
<style type="text/css">
body { background: url(trowelman.gif); color: black; }
A:link { color: #000099 } /* unvisited links */
A:visited { color: #FF0033 } /* visited links */
A:hover { color: #0000FF } /* user hovers */
A:active { color: #00ff00 } /* active links */
font-size { size: 12px; }
p { text-indent: 2em: margin-top: 0; margin-bottom: 0; }
</style>
Is there a way to fix the bg image using css?
Cheers
Oh the BG image shows alright but it scrolls with the page and i want it to stay fixed firmly in the centre.
I would usually write it like;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.wc3.org/tr/html4/strict.dtd">
<html>
<head>
<title>you little ripper</title>
<body bgcolor="#ffffff" text="#003366" link="#0000CC" vlink="#006600" alink="#ff6666" topmargin="2" leftmargin="5" background="trowelman.gif" bgproperties="fixed">
</body>
</html>
But I want to use CSS so if I write this;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.wc3.org/tr/html4/strict.dtd">
<html>
<head>
<title>You little ripper</title>
<style type="text/css">
body { background: url(trowelman.gif); color: black; }
A:link { color: #009 } /* unvisited links */
A:visited { color: #F03 } /* visited links */
A:hover { color: #00F } /* user hovers */
A:active { color: #0f0 } /* active links */
p {
font-size: 12px;
}
p { text-indent: 1em; margin-top: 0; margin-bottom: 0; }
</style>
</head>
<body>
</body>
</html>
how do I stop the image scrolling?
<quote>The property "font-size" needs to be in a declaration such as:
p {
font-size: 12px;
}</quote>
Thanks for that. That was going to be my next question
<quote>You could shorthand the colors: #f03 etc.</quote>
Hey that is an awesome tip. Thanks very much for that