html fixed background

Associate
Joined
14 Nov 2005
Posts
1,396
Location
Belfast
ok so i would like to fix the background on my website, so when i scroll, the text will scroll, but the image will stay
Code:
<body background="img36.jpg" height="593" width="928" text="#FFEBCD"
link="#DC143C" vlink="#00FFFF" alink="#00ddff">

what do i need to add to fix it?
 
Dear god, 1990 called and wants it's HTML back!

Put this in your stylesheet

body
{
background-image: url('whatever.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
}

hey, i just started using html leave me alone :)

<body text="#FFEBCD" link="#DC143C" vlink="#00FFFF" alink="#00ddff">
{
background-image: url('img36.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
}

like that?
 
Last edited:
Define a CSS style for the BODY tag, then there are CSS options to fix the image, can't remember them off hand, if you use Dreamweaver it will give you the relevant options.

Rgds

Radderfire

using notepad and i have no idea what you just told me to do lol

its for my uni course. the two lecturers for this module are pretty old, so thats prob why they taught us old code

we are supoosed to type it in code for scratch which is why im using notepad
 
Back
Top Bottom