CSS Problem

Soldato
Joined
20 Oct 2002
Posts
6,212
Location
UK
Hi,

I'm at it again :p

http://www.mattfrost.net/fotchsa/

I'm trying to get the banner for this website to appear in the centre of the light shaded area,

My attempt is to indent the text a large negative number of pixels to the left (using CSS) and the have the image just sit where the text would have been, so that if the CSS is disabled the text jumps back onto the screen.

The only problem is, the image isn't where i want it to be and i cant figure out why...

I've got <h1 id="fotchsa_banner"> and have this style being used on it:

Code:
#fotchsa_banner {
	text-indent: -5000px;
	background: url(../img/FOTCH_Banner_sandy.jpg) no-repeat;
	height: 240px;
	width: 798px;
	/*margin: 10px auto 0 auto;
	padding: 20px 0 0 0;*/
}

What am I doing wrong?
 
Looking at it, the image should display where you want it to (after applying some margin to the left)... but of course, the first thing you need to do is specify an image that actually exists. ;)
 
No, it's pointed to
root/fotchsa/img/FOTCH_Banner_sandy.jpg

You need to go down another level.
background: url(../../img/FOTCH_Banner_sandy.jpg) no-repeat;

edit: or move the image into FOTCH/img of course.
 
Last edited:
Back
Top Bottom