BODY BACKGROUND + js

Discussion in 'HTML' started by Krystian =?iso-8859-2?Q?Pie=E6ko?=, Jul 22, 2005.

  1. 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



    --
    "You're born with a spark... to search for the truth, for the best You can
    be. Practice. Discipline. Preparation. Try and try again. Then one day
    You're on top and they say you're an 'overnight success', a 'natural'. You
    smile, You know." *Anonymous*
     
    Krystian =?iso-8859-2?Q?Pie=E6ko?=, Jul 22, 2005
    #1
    1. Advertising

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

    JDS Guest

    On Fri, 22 Jul 2005 16:05:56 +0000, Krystian Pieko wrote:

    > 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...

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Jul 22, 2005
    #2
    1. Advertising

  3. 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


    --
    "You're born with a spark... to search for the truth, for the best You can
    be. Practice. Discipline. Preparation. Try and try again. Then one day
    You're on top and they say you're an 'overnight success', a 'natural'. You
    smile, You know." *Anonymous*
     
    Krystian =?iso-8859-2?Q?Pie=E6ko?=, Jul 22, 2005
    #3
  4. Krystian =?iso-8859-2?Q?Pie=E6ko?=

    JDS Guest

    On Fri, 22 Jul 2005 17:18:21 +0000, Krystian Piecko wrote:

    > 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.

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
     
    JDS, Jul 22, 2005
    #4
  5. JDS wrote:
    > On Fri, 22 Jul 2005 17:18:21 +0000, Krystian Piecko wrote:
    >
    >
    >>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.
    >


    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....

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jul 22, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ruca

    Body background

    ruca, Mar 1, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    750
    Dan Brussee
    Mar 2, 2004
  2. Just D.
    Replies:
    2
    Views:
    1,893
    Just D.
    Jan 12, 2005
  3. Michael

    Body Background

    Michael, Sep 4, 2003, in forum: HTML
    Replies:
    1
    Views:
    438
    B. Seifert
    Sep 4, 2003
  4. London Boy
    Replies:
    2
    Views:
    359
    Keith Bowes
    Jan 12, 2004
  5. Replies:
    5
    Views:
    243
    A. Sinan Unur
    Sep 8, 2005
Loading...

Share This Page