Using background image from same directory?

Discussion in 'HTML' started by Jeff Wisnia, Nov 15, 2006.

  1. Jeff Wisnia

    Jeff Wisnia Guest

    I have this line right after </head> on a web page:

    <body style="background-color: rgb(255, 255, 255); background-image:
    url(http://home.comcast.net/~myname27/ltblupap.jpg);">

    The image (ltblupap.jpg) is located in the same server directory as the
    page it is in.

    How do I change the code so it doesn't need all that referencing to that
    http://home.....thing?

    Thanks guys,

    Jeff



    --
    Jeffry Wisnia
    (W1BSV + Brass Rat '57 EE)
    The speed of light is 1.8*10^12 furlongs per fortnight.
     
    Jeff Wisnia, Nov 15, 2006
    #1
    1. Advertising

  2. ..oO(Jeff Wisnia)

    >I have this line right after </head> on a web page:
    >
    ><body style="background-color: rgb(255, 255, 255); background-image:
    >url(http://home.comcast.net/~myname27/ltblupap.jpg);">
    >
    >The image (ltblupap.jpg) is located in the same server directory as the
    >page it is in.
    >
    >How do I change the code so it doesn't need all that referencing to that
    >http://home.....thing?


    <body style="background: #FFF url(ltblupap.jpg)">

    But you should use an external stylesheet.

    Micha
     
    Michael Fesser, Nov 15, 2006
    #2
    1. Advertising

  3. On Wed, 15 Nov 2006 17:37:40 -0500, in alt.html Jeff Wisnia
    <> wrote:

    >
    >I have this line right after </head> on a web page:
    >
    ><body style="background-color: rgb(255, 255, 255); background-image:
    >url(http://home.comcast.net/~myname27/ltblupap.jpg);">
    >
    >The image (ltblupap.jpg) is located in the same server directory as the
    >page it is in.
    >
    >How do I change the code so it doesn't need all that referencing to that
    >http://home.....thing?
    >
    >Thanks guys,
    >
    >Jeff


    If I'm not mistaken, just put in the filename. Also, if I'm reading
    your style correctly, you want the default color to be white:

    <body style="background: white url (ltblupap.jpg)">

    That should work...
    --
    William Hughes, San Antonio, Texas:
    The Carrier Project: http://home.grandecom.net/~cvproj/carrier.htm
    Support Project Valour-IT: http://soldiersangels.org/valour/index.html
     
    William Hughes, Nov 15, 2006
    #3
  4. Jeff Wisnia

    dorayme Guest

    In article <>,
    Michael Fesser <> wrote:

    > .oO(Jeff Wisnia)
    >
    > >I have this line right after </head> on a web page:
    > >
    > ><body style="background-color: rgb(255, 255, 255); background-image:
    > >url(http://home.comcast.net/~myname27/ltblupap.jpg);">
    > >
    > >The image (ltblupap.jpg) is located in the same server directory as the
    > >page it is in.
    > >
    > >How do I change the code so it doesn't need all that referencing to that
    > >http://home.....thing?

    >
    > <body style="background: #FFF url(ltblupap.jpg)">
    >
    > But you should use an external stylesheet.
    >
    > Micha


    What if this is his only style?

    --
    dorayme
     
    dorayme, Nov 16, 2006
    #4
  5. ..oO(dorayme)

    >In article <>,
    > Michael Fesser <> wrote:
    >>
    >> But you should use an external stylesheet.
    >>

    >What if this is his only style?


    Possible, but very unlikely.

    Micha
     
    Michael Fesser, Nov 16, 2006
    #5
  6. On Thu, 16 Nov 2006 02:35:19 +0100, in alt.html Michael Fesser
    <> wrote:

    >.oO(dorayme)
    >
    >>In article <>,
    >> Michael Fesser <> wrote:
    >>>
    >>> But you should use an external stylesheet.
    >>>

    >>What if this is his only style?

    >
    >Possible, but very unlikely.


    If I have a style that is only used on one page of my website, I place
    it in the code for that page.

    Example: http://home.grandecom.net/~cvproj/spec-space.htm

    I use my external stylesheet
    (http://home.grandecom.net/~cvproj/cvproj.css) for styles that are
    used all over my site.

    --
    William Hughes, San Antonio, Texas:
    The Carrier Project: http://home.grandecom.net/~cvproj/carrier.htm
    Support Project Valour-IT: http://soldiersangels.org/valour/index.html
     
    William Hughes, Nov 16, 2006
    #6
  7. Jeff Wisnia

    dorayme Guest

    In article <>,
    William Hughes <> wrote:

    > On Thu, 16 Nov 2006 02:35:19 +0100, in alt.html Michael Fesser
    > <> wrote:
    >
    > >.oO(dorayme)
    > >
    > >>In article <>,
    > >> Michael Fesser <> wrote:
    > >>>
    > >>> But you should use an external stylesheet.
    > >>>
    > >>What if this is his only style?

    > >
    > >Possible, but very unlikely.

    >
    > If I have a style that is only used on one page of my website, I place
    > it in the code for that page.
    >
    > Example: http://home.grandecom.net/~cvproj/spec-space.htm
    >
    > I use my external stylesheet
    > (http://home.grandecom.net/~cvproj/cvproj.css) for styles that are
    > used all over my site.


    It is certainly a sensible strategy to place whatever might be
    different for only one page in the head of that html doc and this
    is better than placing it in the body at various points.

    (btw, Bill, your header is badly "cut-off" by the text-size I
    tend to use by afternoon (when I am getting tired). I have not
    looked at your markup or css but may I suggest you either use an
    em based dim and/or else be more generous in the dim that
    controls the banner bottom margin or the top margin of what is
    under etc...

    I noticed because I get uncomfortable when I see earthlings
    shooting off into space, they might get to see my humble origins.
    Look, it's not exactly that I am ashamed or anything... just... I
    dunno... it's sort of private...)

    --
    dorayme
     
    dorayme, Nov 16, 2006
    #7
  8. Jeff Wisnia

    John Hosking Guest

    dorayme wrote:
    > In article <>,
    > William Hughes <> wrote:
    >>
    >>Example: http://home.grandecom.net/~cvproj/spec-space.htm
    >>

    > (btw, Bill, your header is badly "cut-off" by the text-size I
    > tend to use by afternoon (when I am getting tired). I have not
    > looked at your markup or css but may I suggest you either use an
    > em based dim and/or else be more generous in the dim that
    > controls the banner bottom margin or the top margin of what is
    > under etc...
    >

    His header is cut off because he's specifying an iframe for it, and the
    iframe has height=70 (by which he presumably means 70px). The height
    specification has no relationship to the font size.

    I don't have to wait until I'm tired and have boosted my font size; as
    soon as I size my viewport narrower than about 1248px, the header
    breaks. And I almost never have my viewport that wide; that's almost
    full-screen.

    --
    John
     
    John Hosking, Nov 16, 2006
    #8
  9. On Thu, 16 Nov 2006 06:58:56 +0100, in alt.html John Hosking
    <> wrote:

    >dorayme wrote:
    >> In article <>,
    >> William Hughes <> wrote:
    >>>
    >>>Example: http://home.grandecom.net/~cvproj/spec-space.htm
    >>>

    >> (btw, Bill, your header is badly "cut-off" by the text-size I
    >> tend to use by afternoon (when I am getting tired). I have not
    >> looked at your markup or css but may I suggest you either use an
    >> em based dim and/or else be more generous in the dim that
    >> controls the banner bottom margin or the top margin of what is
    >> under etc...
    >>

    >His header is cut off because he's specifying an iframe for it, and the
    >iframe has height=70 (by which he presumably means 70px). The height
    >specification has no relationship to the font size.
    >
    >I don't have to wait until I'm tired and have boosted my font size; as
    >soon as I size my viewport narrower than about 1248px, the header
    >breaks. And I almost never have my viewport that wide; that's almost
    >full-screen.


    Unfortunately, GrandeCom does not enable SSI in personal webspace, so
    I have to use IFRAME.

    Anybody know a way to dynamically resize an IFRAME? Or another way to
    do the same thing?

    --
    William Hughes, San Antonio, Texas:
    The Carrier Project: http://home.grandecom.net/~cvproj/carrier.htm
    Support Project Valour-IT: http://soldiersangels.org/valour/index.html
     
    William Hughes, Nov 16, 2006
    #9
  10. Jeff Wisnia

    dorayme Guest

    In article <>,
    William Hughes <> wrote:

    > On Thu, 16 Nov 2006 06:58:56 +0100, in alt.html John Hosking
    > <> wrote:
    >
    > >dorayme wrote:
    > >> In article <>,
    > >> William Hughes <> wrote:
    > >>>
    > >>>Example: http://home.grandecom.net/~cvproj/spec-space.htm
    > >>>
    > >> (btw, Bill, your header is badly "cut-off" by the text-size I
    > >> tend to use by afternoon (when I am getting tired). I have not
    > >> looked at your markup or css but may I suggest you either use an
    > >> em based dim and/or else be more generous in the dim that
    > >> controls the banner bottom margin or the top margin of what is
    > >> under etc...
    > >>

    > >His header is cut off because he's specifying an iframe for it, and the
    > >iframe has height=70 (by which he presumably means 70px). The height
    > >specification has no relationship to the font size.
    > >
    > >I don't have to wait until I'm tired and have boosted my font size; as
    > >soon as I size my viewport narrower than about 1248px, the header
    > >breaks. And I almost never have my viewport that wide; that's almost
    > >full-screen.

    >
    > Unfortunately, GrandeCom does not enable SSI in personal webspace, so
    > I have to use IFRAME.
    >
    > Anybody know a way to dynamically resize an IFRAME? Or another way to
    > do the same thing?


    There are various things you could do:

    (1) put in a height:

    /* IFRAME defaults */

    iframe {width: 100%; border: 0; height: 12em;}

    just about gets it.

    (2) improve the situation by not having the heading words "The
    Carrier Project" wrap in this design (need help on this?) and
    then being able to settle on a smaller em size for height (a
    "good thing" because it is not good taking up too much height
    space for non content stuff

    --
    dorayme
     
    dorayme, Nov 16, 2006
    #10
    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. Raydog
    Replies:
    3
    Views:
    22,318
    Raydog
    Apr 9, 2004
  2. news.sbcglobal.net
    Replies:
    2
    Views:
    15,209
    Mark Rae
    May 24, 2006
  3. jc
    Replies:
    3
    Views:
    1,793
  4. jc
    Replies:
    1
    Views:
    1,416
    Neredbojias
    Mar 19, 2008
  5. Dj Frenzy
    Replies:
    3
    Views:
    355
    Robert
    Feb 10, 2004
Loading...

Share This Page