External Style Sheet, background-image attribute

Discussion in 'HTML' started by John Seeliger, Feb 17, 2005.

  1. I am trying to make a page that has a green margin on the left where I will
    ultimately place my navigation bar, and is white elsewhere. I am trying to
    use an external style sheet. The page I am trying to get it to work on is
    www.desototexasusa.com , but I can't seem to get it to recognize the
    external style sheet at all. I have another page that is closer to what I
    am trying to do, except it has the style elements within the page itself:
    www.desototexasusa.com/index2.html .

    What am I doing wrong on the index.html page that it won't recognize the
    style sheet at all, and what am I don't wrong on both of them that the
    background won't show up? the index2 page works with the local copy I have
    on my PC when I use:

    body {background-image: url("images/green%20white.jpg"); margin-left: 25%;
    margin-right: 10%;}

    but it won't work on the uploaded version, either with the
    images/green%20white.jpg or the full URL.

    Thanks,
    -John
    John Seeliger, Feb 17, 2005
    #1
    1. Advertising

  2. John Seeliger

    Els Guest

    John Seeliger wrote:

    > I am trying to make a page that has a green margin on the
    > left where I will ultimately place my navigation bar, and
    > is white elsewhere. I am trying to use an external style
    > sheet. The page I am trying to get it to work on is
    > www.desototexasusa.com , but I can't seem to get it to
    > recognize the external style sheet at all.


    Your stylesheet:

    <style type="text/css">
    body {background-image: url("images/green white.jpg"); margin-
    left: 25%; margin-right: 10%;}
    h1 { margin-left: -8%;}
    h2,h3,h4,h5,h6 { margin-left: -4%; }
    </style>

    Take out the html element:
    <style type="text/css">
    </style>
    shouldn't be in the stylesheet.


    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Status Quo - Let's Work Together
    Els, Feb 17, 2005
    #2
    1. Advertising

  3. "Els" <> wrote in message
    news:Xns9600B7DBCF533Els@130.133.1.4...
    > Your stylesheet:
    >
    > <style type="text/css">
    > body {background-image: url("images/green white.jpg"); margin-
    > left: 25%; margin-right: 10%;}
    > h1 { margin-left: -8%;}
    > h2,h3,h4,h5,h6 { margin-left: -4%; }
    > </style>
    >
    > Take out the html element:
    > <style type="text/css">
    > </style>
    > shouldn't be in the stylesheet.


    OK, thanks. That solved the first problem. Now just need to figure out the
    background-image one.

    -John
    John Seeliger, Feb 17, 2005
    #3
  4. John Seeliger

    Els Guest

    John Seeliger wrote:

    >> body {background-image: url("images/green white.jpg");


    > Now just need to figure out the background-image one.


    Could well have to do with having spaces in the image file name.

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Status Quo - Lucille
    Els, Feb 17, 2005
    #4
  5. On 17 Feb 2005 17:10:54 GMT, Els <> wrote:

    > John Seeliger wrote:
    >
    >>> body {background-image: url("images/green white.jpg");

    >
    >> Now just need to figure out the background-image one.

    >
    > Could well have to do with having spaces in the image file name.
    >


    and with the "". I think those are supposed to work, but I seem to always
    run in to trouble if I use "" for the url for a background-image in a CSS
    stylesheet. I use '' or nothing. Both work fine for me.

    --
    ,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
    | weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
    | webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
    |zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
    `-------------------------------------------------- --<--@ ------------'
    Barbara de Zoete, Feb 17, 2005
    #5
  6. "Els" <> wrote in message
    news:Xns9600B8F582C31Els@130.133.1.4...
    > John Seeliger wrote:
    >
    >>> body {background-image: url("images/green white.jpg");

    >
    >> Now just need to figure out the background-image one.

    >
    > Could well have to do with having spaces in the image file name.


    I figured it out. Windows is not case sensitive and Unix is, so the
    filename is actually images/green white.JPG .

    Thanks for the help.

    -John
    John Seeliger, Feb 17, 2005
    #6
  7. John Seeliger

    Els Guest

    Barbara de Zoete wrote:
    > On 17 Feb 2005 17:10:54 GMT, Els <>
    > wrote:
    >> John Seeliger wrote:
    >>
    >>>> body {background-image: url("images/green white.jpg");

    >>
    >>> Now just need to figure out the background-image one.

    >>
    >> Could well have to do with having spaces in the image file
    >> name.

    >
    > and with the "". I think those are supposed to work, but I
    > seem to always run in to trouble if I use "" for the url
    > for a background-image in a CSS stylesheet. I use '' or
    > nothing. Both work fine for me.


    I'm worse: I can't remember any of the " and ' rules, in the
    @import for stylesheets the same, so I don't use them anywhere
    <g>

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Status Quo - Proud Mary
    Els, Feb 17, 2005
    #7
    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. Harold A. Mackey

    Visual Studio external style sheet problems

    Harold A. Mackey, Mar 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    397
    Eliyahu Goldin
    Mar 7, 2005
  2. cmonsta
    Replies:
    1
    Views:
    583
    Patrick Olurotimi Ige
    Mar 8, 2005
  3. Luigi Donatello Asero

    External style-sheet for disabled people.

    Luigi Donatello Asero, Jun 27, 2004, in forum: HTML
    Replies:
    20
    Views:
    1,069
  4. Simon
    Replies:
    2
    Views:
    2,084
  5. Replies:
    0
    Views:
    494
Loading...

Share This Page