Sign in to follow this  
Picc84

html background help. Confused

Recommended Posts

style="color: rgb(204, 204, 204); background-color: rgb(0, 0, 0); background-image: url(../My%20Documents/My%20Pictures/sotbg1.bmp);"

yspeed="1" background-repeat=""repeat-y=""

background-position="" center="" alink="#ffcc99"

link="#ffcccc" vlink="#990099">

Whats going on with this code? I see nothing wrong with it, yet it totally does nothing to what I want it to do. reapeat sideways. and scroll up and down with the user, staying at the bottom of what the user has in its window at all time.

Share this post


Link to post
Share on other sites


I, admittedly, don't remember much about HTML. But that little bit of CSS should give you the desired effect at least.

Share this post


Link to post
Share on other sites

Not sure about it repeating, but to put it in place:


I just looked off a site that I knew had a fixed background and found the code.

Share this post


Link to post
Share on other sites
style="color: rgb(204, 204, 204); background-color: rgb(0, 0, 0); background-image: url(../My%20Documents/My%20Pictures/sotbg1.bmp);"

yspeed="1" background-repeat=""repeat-y=""

background-position="" center="" alink="#ffcc99"

link="#ffcccc" vlink="#990099">

Whats going on with this code? I see nothing wrong with it, yet it totally does nothing to what I want it to do. reapeat sideways. and scroll up and down with the user, staying at the bottom of what the user has in its window at all time.

Directly translated into actual an actual HTML CSS "style" attribute, that should be:

style="color: rgb(204, 204, 204); background-color: rgb(0, 0, 0); background-image: url('../My%20Documents/My%20Pictures/sotbg1.bmp'); background-repeat: repeat-y; background-position: center; a:active: #ffcc99; a:visited: #990099; a: #ffcccc;"

yspeed isn't CSS, and there are multiple issues with the quoting and delimiters (in css, it's "attribute: value", not "attribute=value") in the example code.

Share this post


Link to post
Share on other sites

Actually, drakaan, there's a quote after the background-image declaration which ends the style attribute for that element tag. However, why background-repeat and background-position are outside of said style attribute is beyond me.

Wither has it almost right. If I'm reading Picc's request correctly, he wishes the background to stay at the bottom while the user scrolls the rest of the content. If that is the case, background-attachment:fixed; would be the way to go.

Also, you can put all that on one line:

background:url(path/to/img.ext) #000 repeat-x fixed bottom center;

Share this post


Link to post
Share on other sites
Actually, drakaan, there's a quote after the background-image declaration which ends the style attribute for that element tag. However, why background-repeat and background-position are outside of said style attribute is beyond me.

Right. Since it started with a style=..., I just transliterated the line into a form where the css attributes that were listed ended up inside the style attribute of whatever tag that was.

Wither has it almost right. If I'm reading Picc's request correctly, he wishes the background to stay at the bottom while the user scrolls the rest of the content. If that is the case, background-attachment:fixed; would be the way to go.

True...I was just addressing the unique way in which that line was written.

Also, you can put all that on one line:

background:url(path/to/img.ext) #000 repeat-x fixed bottom center;

Starting to feel like slashdot in here! :P

Share this post


Link to post
Share on other sites

background:url="C:\Documents and Settings\Compaq_Administrator\My Documents\My Pictures\sotbg1"

repeat-x="" fixed="" bottom="" center="">

That dident work... for some reason... Is it my location of the image? sorry, new to actually USEING HTML... lmfao

Share this post


Link to post
Share on other sites
background:url="C:\Documents and Settings\Compaq_Administrator\My Documents\My Pictures\sotbg1"

repeat-x="" fixed="" bottom="" center="">

That dident work... for some reason... Is it my location of the image? sorry, new to actually USEING HTML... lmfao

Look very carefully at the differences between what you just posted and what Crazy Man Dan posted.

The "punctuation" matters. A lot. The syntax (word order, what's inside quotes and what isn't) matters, too.

Share this post


Link to post
Share on other sites
On an unrelated note, you should convert the BMP to PNG.

Some older browsers don't support PNG. Isn't that sad?

Hopefully everyone has Mozilla Firefox 2 (aka the best browser in the world)!! :D

Share this post


Link to post
Share on other sites
Some older browsers don't support PNG. Isn't that sad?

What I find more sad is that they haven't been forced/prompted to upgrade yet by either the browser or their OS, which to me indicates bad marketing.

Hopefully everyone has Mozilla Firefox 2 (aka the best browser in the world)!! :D

No hope is necessary, Firefox has the power to convince and persuade in its own :P. Go Firefox!

EDIT: looking at my post looks like a quote extravaganza with my signature and all. Wait until you see this post.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this