Actually, I could be incorrect about this one. It's been a while since ive use an image for a background. I think that will work though. some one correct me if I'm wrong.

gsv2com

Professor

Posts: 776

Loc: Nippon

3+ Months Ago

Sonire, what the heck is that?

HTML uses < and >
CSS uses { and }

jannin

Beginner

Posts: 40

Loc: Cranbrook, BC Canada

3+ Months Ago

heh, thanks all,

actually I got impatient and figured that part out on my own but now I'd like to know...
is there any way to use the codes you've given me, and change the size of the image so it's the same size as the screen (100%)?

Tried to find that out on my own, didn't work too well. x.x

Thanks again!
/jannin

Nunzio390

Student

Posts: 70

Loc: Tharsis Ridge (Martian lowlands)

3+ Months Ago

CSS cannot be used to accomplish what you want, but other techniques can be used. Look at tedster's replies in this thread, and also look at the very last reply by starway...

http://www.webmasterworld.com/forum83/303.htm

gsv2com

Professor

Posts: 776

Loc: Nippon

3+ Months Ago

Nunzio390 wrote:

CSS cannot be used to accomplish what you want, but other techniques can be used. Look at tedster's replies in this thread, and also look at the very last reply by starway...

http://www.webmasterworld.com/forum83/303.htm

For proof that you can do this with CSS, look at http://www.gsv2.com/en/?p=gallery

The dj image on the bottom right is a fixed background.

Nunzio390

Student

Posts: 70

Loc: Tharsis Ridge (Martian lowlands)

3+ Months Ago

Errrr... I don't see any indication on that Groove Seeker page where any background image has been resized to stretch to accommodate 100% of the width and height of a user's screen resolution. The Groove Seeker page you linked to above is however a perfect example of a fixed background in use, which is what jannin's first question in this thread was asking, and which I and others already responded to immediately after. I supplied the CSS to show how to do so and digitalMedia gave a shortened version. I am not disputing that a fixed background is possible. It most definitely is. When I answered jannin above (and where you quoted me), I answered in direct response to and immediately following jannin's 2nd question in this thread, quoted below and highlighted in italic bold...

jannin wrote:

heh, thanks all,

actually I got impatient and figured that part out on my own but now I'd like to know...is there any way to use the codes you've given me, and change the size of the image so it's the same size as the screen (100%)?

Tried to find that out on my own, didn't work too well. x.x

Thanks again!/jannin

gsv2com

Professor

Posts: 776

Loc: Nippon

3+ Months Ago

My bad, I thought we were still discussing the fixed background issue. Guess I should take my own advice and READ before posting.

jannin

Beginner

Posts: 40

Loc: Cranbrook, BC Canada

3+ Months Ago

Slight problem, Nunzio390, I can't enter that thread, it's members only, and I'd have to pay to register.

Any other ideas?

/jannin

Nunzio390

Student

Posts: 70

Loc: Tharsis Ridge (Martian lowlands)

3+ Months Ago

jannin....

Are you referring to this thread? ...
http://www.webmasterworld.com/forum83/303.htm

It's true that you can't reply to any thread there without first registering and then logging in. But you most certainly do not have to pay to register there. It's a forum, similar to here at Ozzu.

Go ahead and register there, if you'd also like to post there too...
http://www.webmasterworld.com/reg.cgi

Truce

Guru

Posts: 1477

Loc: Washington DC

3+ Months Ago

You could also do a resolution check and then redirect to a separate page so it all fit correctly.

more on how to do this at <a href="http://www.dynamicdrive.com">Dynamic Drive</a>

rtm223

Mastermind

Posts: 1855

Loc: Uk

3+ Months Ago

have the image position absolute, in the top left corner, stretched 100% and then set the z-index so its behind everything!

Then place the image you want for your background in an img with id="backgroundimage".

I don't know if that z index will work, you might need to set some other z-indeces on other elements. Have a go and see what happens, unless someone else has already tried this and it doesn't work lol.

If you are going to check for screen size, then don't do a redirect, just put something like this in your title tag:

Saves you messing around with multiple pages and all that. It also gives you a handy alternative to those people who have javascript switched off.

BTW I have tested none of the code here so it will all need debugging....

rtm223

Mastermind

Posts: 1855

Loc: Uk

3+ Months Ago

Ok, I have now tried the first one...

It works if:

a)everything else on your page has a higher z-index AND everything else on the page is absolutely positioned (Or you have to put the image as the first object in the body tag.

b) you are not using IE (IE can't cope with fixed position stuff too well, there may be a hack but I don't know it...)

So possibly best to ignore that one, The second one should still work...

//edit: in case you were wondering, the background-size property should be introduced for css3:
http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size

LazyJim

Student

Posts: 92

3+ Months Ago

CSS3 will be so much fun!

I did a fix for IE fixed position here: <a href="http://dev.jdenny.co.uk/css/ie_fixed.html">IE Fiexed!</a>

rtm223

Mastermind

Posts: 1855

Loc: Uk

3+ Months Ago

Huh! Thats eric meyers complex spiral....
But it works in IE.
You so clever

Except it doesnt work when javascript is disabled... Not so clever as I thought. Well done though still. I'm just embarking on building a website looking at all sorts of stuff like this, with tutorials and suchlike. Would you mind if I included this, either as a tutorial, explanation or just a link to this page? I will give you full credit!

Hmmm css3 will be fun, but when will we reall get to use it - IE doesn't support css1 properly yet

jannin

Beginner

Posts: 40

Loc: Cranbrook, BC Canada

3+ Months Ago

Wow, thanks a lot rtm223, I'll give all that a go in a bit, tell you how badly I screw it up