0

0

Hi - I tried out the Background Image Scaling script and with Cybr's update it works like magic. It SCALES the image perfectly. No distortion.

BUT, my image isn't "computer friendly". I.e.: Not 1024 X 768 or even close to that. (Heck, my monitor has a wide screen, so it isn't 1024 X 768 either! Is anybody's anymore?)

Anyhow, this creates a problem inasmuch as, unless I size the window from the bottom up it ends up with a white "stripe" beneath it.

What I would REALLY like for it to do is have that white to be BLACK.

My "usual" BG color/text etc. code is like:

<body bgcolor="#000000" text="#fcba1e" link="#0000ff" vlink="#800080" alink="#ff0000">

(Site won't let me add the arrows here.)

I've tried inserting this in various places with no success. Any ideas for a workaround would surely be appreciated !

Thanks ! Bill

Mottie
  • 84,355
  • 30
  • 126
  • 241
OldGuy
  • 1
  • 3
    Could you share a link to the script you are referring to as well as Cybr's (who ever that is) update. And to post code, use the icon with the 101010 then paste it... I'll update your question this time. – Mottie May 14 '10 at 20:59
  • +1 for the script link request. It's very likely that the script is putting the image into a div or similar element and then scaling it. All you'll probably need to do is look through the script and find out the id / class of that container element, and add background="#000000" to it, rather than the body. – Mathew May 14 '10 at 21:09
  • Thanks for the comebacks. Here's where I found the stretch/scale info: http://stackoverflow.com/questions/1150163/stretch-and-scale-a-css-image-background-with-css-only/2830082#2830082 Cybr added the line that corrected the scaling problem. I got that figured out, but the revert to black has eluded me. I've "learned" html by trial and error. (A lot of both.) Though css is probably the answer to the body tags, it's a lot more complicated than html. At least for an old guy like me. Now if I had a line of code I could simply copy and insert.... Thanks again - Bill – OldGuy May 17 '10 at 21:58

1 Answers1

2

Before trying anything, I recommend you replace your

<body bgcolor="#000000" text="#fcba1e" link="#0000ff" vlink="#800080" alink="#ff0000">

with css.

nebkat
  • 8,445
  • 9
  • 41
  • 60
  • 1
    +1. Separating your styling from your markup will make your HTML documents much easier to parse/manipulate with javascript. – Damien Wilson May 15 '10 at 07:55
  • Thanks for the comebacks. I've "learned" html by trial and error. (A lot of both.) My web page (p-b-l.com) could probably be streamlined a bunch by utilizing css, but it seems a lot more complicated than html. At least for an old guy like me. (Remember: It's hard to teach an old dog new tricks! ) Now if I had a line of code I could simply copy and insert.... ( Sigh. ) Thanks again - Bill – OldGuy May 17 '10 at 22:06