BODY BACKGROUND + js

  • Thread starter Krystian =?iso-8859-2?Q?Pie=E6ko?=
  • Start date
K

Krystian =?iso-8859-2?Q?Pie=E6ko?=

Hello

First of all I wanted to say that I have never written any web page.
Now I have no choise. I've witten everything in plain HTML. It's very
simple. I have realised that this wsite is different in diff..screen
resolutions. So I tried to do something like this:

#v+

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="author" CONTENT="CO.IN.">
<META HTTP-EQUIV="Content-Language" CONTENT="pl">
<TITLE>main.html</TITLE>
</HEAD>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
if (screen.width == 640)
document.write('<BODY BACKGROUND="../images/layout640x400.jpg">');
if (screen.width == 800)
document.write('<BODY BACKGROUND="../images/layout800x600.jpg">');
if (screen.width == 1024)
document.write('<BODY BACKGROUND="../images/layout1024x768.jpg">');
if (screen.width == 1280)
document.write('<BODY BACKGROUND="../images/layout1280x1024.jpg">');
else
document.write('<BODY BACKGROUND="../images/layout800x600.jpg">');

if (self == parent)
document.write('
<DIV ALIGN="center">
<B>UWAGA!</B> To jest tylko ramka - wróæ do
<A HREF="index.html"><B>STRONY&nbsp;G£ÓWNEJ</B></A>
</DIV>
<HR><BR><BR>'
);
//-->

</SCRIPT>
</BODY>
</HTML>

#v-

There is no background in this page.
I am C/C++ and shell, Perl programer I have no time to learn about css.
I wanted to do this as simple as possible, but it dosn't work. Maybe
I didn't understand the write function. How to change my code ??

Krystian
 
J

JDS

I am C/C++ and shell, Perl programer I have no time to learn about css.


Well, then any solution provided will not be acceptable, as I'm afraid
you're gonna have to learn something new.

I recommend ditching the background entirely. What you are attempting is
hard to do and can never really be done reliably, given the fluid and
unpredictable nature of the Web.

Also, could you post an example URL? Would make it easier to make
suggestions.

later...
 
K

Krystian =?iso-8859-2?Q?Pie=E6ko?=

Dnia Fri, 22 Jul 2005 12:39:14 -0400, gra³em na gitarze, a¿ tu nagle
mój spokój wewnêtrzny zak³óci³ JDS pisz±c:
Well, then any solution provided will not be acceptable, as I'm afraid
you're gonna have to learn something new.

I recommend ditching the background entirely. What you are attempting is
hard to do and can never really be done reliably, given the fluid and
unpredictable nature of the Web.

Also, could you post an example URL? Would make it easier to make
suggestions.

I promise to learn css but now I have no time. Alsa this page is not on
any server.

I want to do something like this:

+-----------+--------------------------------------+---------------+
| | | |
| | | |
| LINKS | PAGE WITH BACKGROUND | LINKS |

[..]

+-----------+--------------------------------------+---------------+

For me the most importand thing is that this page looks well in
resolutions >= 800x600. Image that is in the middle is very big. It is
prepared to 1280x1024 screen resolution. I can resizeit with gimp for
example, but I have to have possibility to show the right picture in
background. Maybe is there possibility to put an image under everything.
I understand that I will have to put this background into those links, but
how to do this resizeable background image. It is importand to me.
Im looking forward for an answer.

Krystian
 
J

JDS

I understand that I will have to put this background into those links, but
how to do this resizeable background image. It is importand to me.
Im looking forward for an answer.


There is no good way to do what you seem to want. There are possibly some
ugly ways, using JavaScript, perhaps. But I don't know 'em, sorry.
 
J

Jonathan N. Little

JDS said:
There is no good way to do what you seem to want. There are possibly some
ugly ways, using JavaScript, perhaps. But I don't know 'em, sorry.

Only feasible way I know of is is instead of 1 background to span whole
document, but to divide into the sections that you have. In your example
(LeftLinks, Content, RightLinks). Next make backgrounds tileable.
Apply LeftLinks background to LeftLinks DIV, Content background to
Content DIV and finally RightLinks background to RightLinks DIV. Takes a
little creativity and planing but it will be scalable this way....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top