Background prob!

Discussion in 'HTML' started by Leonidas Athineos, Mar 3, 2006.

  1. Hi i am new in html,and building my home page.
    i want to put a pic as background.
    with the following.

    <style type="text/css">
    body
    {
    background-image:
    url('flagprisonllble1.jpg');
    background-repeat:
    no-repeat;
    background-attachment:
    fixed
    }
    </style>

    and tried with this too..


    <body background="flagprisonllble1.jpg">


    but doesnt work!
    could anyone help me please... :)
    thanks!!

    bye
     
    Leonidas Athineos, Mar 3, 2006
    #1
    1. Advertising

  2. Leonidas Athineos

    Paul Watt Guest

    "Leonidas Athineos" <> wrote in message
    news:du9ejm$1b0i$-clausthal.de...
    > Hi i am new in html,and building my home page.
    > i want to put a pic as background.
    > with the following.
    >
    > <style type="text/css">
    > body
    > {
    > background-image:
    > url('flagprisonllble1.jpg');
    > background-repeat:
    > no-repeat;
    > background-attachment:
    > fixed
    > }
    > </style>
    >
    > and tried with this too..
    >
    >
    > <body background="flagprisonllble1.jpg">
    >
    >
    > but doesnt work!
    > could anyone help me please... :)
    > thanks!!
    >
    > bye
    >
    >


    Are the images in the same folder as your css/html pages? a url might help

    Paul
     
    Paul Watt, Mar 3, 2006
    #2
    1. Advertising

  3. hi!
    Yes they are.i tried to change the pixel size,bec i thought it might
    help...burt finally it didnt.
    The thing is that there are actually some pictures that i can display as
    backgrounds but others not

    thanks for the help

    "Paul Watt" <> wrote in message
    news:du9frt$ebj$...
    >
    > "Leonidas Athineos" <> wrote in message
    > news:du9ejm$1b0i$-clausthal.de...
    >> Hi i am new in html,and building my home page.
    >> i want to put a pic as background.
    >> with the following.
    >>
    >> <style type="text/css">
    >> body
    >> {
    >> background-image:
    >> url('flagprisonllble1.jpg');
    >> background-repeat:
    >> no-repeat;
    >> background-attachment:
    >> fixed
    >> }
    >> </style>
    >>
    >> and tried with this too..
    >>
    >>
    >> <body background="flagprisonllble1.jpg">
    >>
    >>
    >> but doesnt work!
    >> could anyone help me please... :)
    >> thanks!!
    >>
    >> bye
    >>
    >>

    >
    > Are the images in the same folder as your css/html pages? a url might help
    >
    > Paul
    >
     
    Leonidas Athineos, Mar 3, 2006
    #3
  4. Leonidas Athineos

    geniolatenio Guest

    On Fri, 3 Mar 2006 13:59:28 +0100, "Leonidas Athineos"
    <> wrote:

    ><style type="text/css">
    >body
    >{
    >background-image:
    >url('flagprisonllble1.jpg');
    >background-repeat:
    >no-repeat;
    >background-attachment:
    >fixed
    >}
    ></style>
    >
    >and tried with this too..
    >
    >
    > <body background="flagprisonllble1.jpg">


    Mmmmm, seems correct to me. Is that the correct position where your
    image is on your hard disk? Is it in the same folder as the html file
    you're coding?

    Bye

    geniolatenio
     
    geniolatenio, Mar 3, 2006
    #4
  5. Leonidas Athineos

    Arne Guest

    Once upon a time *Leonidas Athineos* wrote:

    (Please, don't top post on usenet. Now corrected)

    >
    > "Paul Watt" <> wrote in message
    > news:du9frt$ebj$...
    >>
    >> "Leonidas Athineos" <> wrote in message
    >> news:du9ejm$1b0i$-clausthal.de...
    >>> Hi i am new in html,and building my home page.
    >>> i want to put a pic as background.
    >>> with the following.
    >>>
    >>> <style type="text/css">
    >>> body
    >>> {
    >>> background-image:
    >>> url('flagprisonllble1.jpg');
    >>> background-repeat:
    >>> no-repeat;
    >>> background-attachment:
    >>> fixed
    >>> }
    >>> </style>
    >>>
    >>> and tried with this too..
    >>>
    >>>
    >>> <body background="flagprisonllble1.jpg">
    >>>
    >>>
    >>> but doesnt work!
    >>> could anyone help me please... :)
    >>> thanks!!
    >>>
    >>> bye
    >>>
    >>>

    >>
    >> Are the images in the same folder as your css/html pages? a url might help
    >>


    > hi!
    > Yes they are.i tried to change the pixel size,bec i thought it might
    > help...burt finally it didnt.
    > The thing is that there are actually some pictures that i can display as
    > backgrounds but others not
    >
    > thanks for the help


    And you are sure that the image "flagprisonllble1.jpg" really is a *.jpg
    image and with that exact name? The question may sound stupid, if you
    know it is. But asking anyway, because sometimes people upload images
    saved as *.bmp, *.psp or something without knowing it. Also file names
    are case sensitive ("flagprisonllble1.jpg" is not the same as
    "Flagprisonllble1.JPG") and that also happends often.

    --
    /Arne

    Google Group Users, read about The Usenet Improvement Project:
    http://blinkynet.net/comp/uip5.html
     
    Arne, Mar 3, 2006
    #5
  6. yes,the pic name is correct..and its jpg
    and i have saved it at the same folder as the index file.
    :(

    bye


    "geniolatenio" <> wrote in message
    news:...
    > On Fri, 3 Mar 2006 13:59:28 +0100, "Leonidas Athineos"
    > <> wrote:
    >
    >><style type="text/css">
    >>body
    >>{
    >>background-image:
    >>url('flagprisonllble1.jpg');
    >>background-repeat:
    >>no-repeat;
    >>background-attachment:
    >>fixed
    >>}
    >></style>
    >>
    >>and tried with this too..
    >>
    >>
    >> <body background="flagprisonllble1.jpg">

    >
    > Mmmmm, seems correct to me. Is that the correct position where your
    > image is on your hard disk? Is it in the same folder as the html file
    > you're coding?
    >
    > Bye
    >
    > geniolatenio
     
    Leonidas Athineos, Mar 3, 2006
    #6
  7. Leonidas Athineos

    geniolatenio Guest

    On Fri, 3 Mar 2006 15:34:43 +0100, "Leonidas Athineos"
    <> wrote:

    >yes,the pic name is correct..and its jpg
    >and i have saved it at the same folder as the index file.
    :mad:


    Well, try this: create a new page containing this stuff:

    <html>
    <body background="flagprisonllble1.jpg">
    test
    </body>
    </html>

    If it works then create your style with only the background-image
    thing and replace the aforementioned body tag with a <body>. Check if
    it works. If it does, add all your other stuff in the CSS, one by one,
    and everytime you add something go and check if the bg is still there.
    Keep doing that until you see that it doesn't work. Than that's the
    problem.

    p.s. you can use

    body { background: url(image) fixed no-repeat }

    instead of what you're using.

    Bye

    geniolatenio
     
    geniolatenio, Mar 3, 2006
    #7
  8. Leonidas Athineos

    Arne Guest

    Once upon a time *Leonidas Athineos* wrote:
    > yes,the pic name is correct..and its jpg
    > and i have saved it at the same folder as the index file.
    > :(


    Well it's hard to continue the guessing game :)
    Would you provide the URL to the page or at least to the image, that
    would helpful if you like more help. Help us to help you! :)

    --
    /Arne

    Google Group Users, read about The Usenet Improvement Project:
    http://blinkynet.net/comp/uip5.html
     
    Arne, Mar 3, 2006
    #8
  9. yes sure, its this
    http://home.tu-clausthal.de/~itla/index.html
    please dont be hard on judging, i am still new here.i started learning html
    and css from the web 3 days ago!


    thanks for the help though!!

    bye Leo




    "Arne" <> wrote in message
    news:...
    > Once upon a time *Leonidas Athineos* wrote:
    >> yes,the pic name is correct..and its jpg
    >> and i have saved it at the same folder as the index file.
    >> :(

    >
    > Well it's hard to continue the guessing game :)
    > Would you provide the URL to the page or at least to the image, that
    > would helpful if you like more help. Help us to help you! :)
    >
    > --
    > /Arne
    >
    > Google Group Users, read about The Usenet Improvement Project:
    > http://blinkynet.net/comp/uip5.html
     
    Leonidas Athineos, Mar 3, 2006
    #9
  10. Leonidas Athineos

    Arne Guest

    Once upon a time *Leonidas Athineos* wrote:
    > yes sure, its this
    > http://home.tu-clausthal.de/~itla/index.html
    > please dont be hard on judging, i am still new here.i started learning html
    > and css from the web 3 days ago!
    >
    >
    > thanks for the help though!!


    It would be even better if you stop the top posting, as I allready
    mentioned earlier. That is, post your reply below the content you are
    replying to, after snipping off the signature part belowe the "-- " line
    that you also should use as a signature delemiter.

    Ok, about the page you posted the URL to. First there is a different
    background image than the one you mentioned in your original post,
    starting this thread.

    Now you have "background-image: url('kornpaper800.jpg');" and not the
    initial "url('flagprisonllble1.jpg');" and the "kornpaper800.jpg" image
    shows just fine. Was this something you did recently and did you give up
    on the 'flagprisonllble1.jpg'? However the image is not covering the
    whole browser window, since it is set to "no-repeat".

    Second, your markup is a mess, giving 24 errors in the HTML-validator
    for that minimum of code and content. See the errors here:
    http://validator.w3.org/check?verbose=1&uri=http://home.tu-clausthal.de/~itla/index.html

    Among the errors is missing doctype, markup and content abowe and within
    the <head> and </head> that not belong there. Yes, I know you are new in
    html and that the page is "still under constraction!", but you should
    try to do it right from the beginning to avoid to many problems on the
    way. :)

    The image "Prince Leo.jpg" (should be "princeleo.jpg") is not loaded to
    the page, maybe it's not uploaded to the server, or the name is different?

    --
    /Arne

    Google Group Users, read about The Usenet Improvement Project:
    http://blinkynet.net/comp/uip5.html
     
    Arne, Mar 3, 2006
    #10
  11. Leonidas Athineos

    Chris Beall Guest

    Leonidas Athineos wrote:
    > yes sure, its this
    > http://home.tu-clausthal.de/~itla/index.html
    > please dont be hard on judging, i am still new here.i started learning html
    > and css from the web 3 days ago!

    (snip)

    Leo,

    OK, the page with the current background loads OK, so you know the
    syntax for loading a background image is correct. But that's not the
    image you wanted.

    I tried to access the image directly, i.e. I entered
    "http://home.tu-clausthal.de/~itla/flagprisonlable1.jpg"
    on the address line of my browser, but I got a 404 error, so the server
    cannot find that file. Did you place that background image on the
    server? In the same directory as the index.html page? If you think the
    answers are both 'yes', then something went wrong, 'cause it isn't
    there. Solve that and then change the reference URL and it should work.

    Now, about the HTML. Some key points:

    1. You need a DOCTYPE. Without it, the browser has no idea what variant
    of HTML you are using. See
    http://pages.prodigy.net/chris_beall/TC/DOCTYPE.html for details. [If
    you read the other stuff at that site you will be WAY ahead of most
    people...]

    2. HTML documents have a certain structure. The basic structure is:
    html
    head
    body

    i.e. the head comes before the body. Certain things should only appear
    in the head (title, meta information, style element), others should
    appear only in the body (paragraphs, headers, lists, tables, images,
    etc..) You have things all jumbled up.

    3. The bible for HTML is the HTML 4.01 specification, which you can find
    at http://www.w3.org/TR/html401/cover.html#minitoc, but I usually prefer
    to go straight to the table of elements, which is at
    http://www.w3.org/TR/html401/index/elements.html or attributes at
    http://www.w3.org/TR/html401/index/attributes.html. Not always easy
    reading... When you see something marked 'Deprecated', that means it is
    becoming obsolete. Don't use it. Instead, use the appropriate CSS
    styling; sometimes the HTML spec will actually give you hints about what
    that might be.

    4. The bible for CSS is at
    http://www.w3.org/TR/CSS21/cover.html#minitoc, but again I prefer to
    start at the list of properties at http://www.w3.org/TR/CSS21/propidx.html.

    5. There are three physical ways to use CSS. You can combine all three.
    a. Inline style: example: <p style="text-align: center">yadda
    yadda</p>. This styles a specific HTML element. See
    http://www.w3.org/TR/html401/present/styles.html#adef-style.
    b. <style> element: This is what you are doing now. It styles
    things according to a SELECTOR, which could be an element name (like
    img, which styles all <img> elements), a class (which can style multiple
    elements on a page, regardless of what element they are, or an ID (which
    styles a single element) or combinations of these. <style> elements
    must be in the <head> section of the page. There can be more than one
    of them, but there is no need to do so. See
    http://www.w3.org/TR/html401/present/styles.html#edef-STYLE.
    c. A separate style sheet. This extends the flexibility of the
    previous approach to provide one style sheet for multiple pages, with
    each page simply pointing to the style it should use. See the <link>
    element in the tutorial at http://www.w3.org/TR/CSS21/intro.html#q1.

    When you are starting out, it's best to use 'a' or 'b', but you should
    quickly graduate to 'c' because it allows you to have one style sheet
    for an entire site, thus avoiding duplication and helping to create a
    consistent style across the site.

    Chris Beall
     
    Chris Beall, Mar 3, 2006
    #11
  12. Leonidas Athineos

    dorayme Guest

    In article <>,
    Arne <> wrote:

    > Once upon a time *Leonidas Athineos* wrote:
    > > yes,the pic name is correct..and its jpg
    > > and i have saved it at the same folder as the index file.
    > > :(

    >
    > Well it's hard to continue the guessing game :)
    > Would you provide the URL to the page or at least to the image, that
    > would helpful if you like more help. Help us to help you! :)


    http://dorayme.150m.com/jokes/josephLottery.html

    --
    dorayme
     
    dorayme, Mar 3, 2006
    #12
  13. Adrienne Boswell, Mar 4, 2006
    #13
  14. Leonidas Athineos

    dorayme Guest

    dorayme, Mar 4, 2006
    #14
  15. Gazing into my crystal ball I observed dorayme
    <> writing in news:doraymeRidThis-
    :

    > In article <Xns977BEFFBEF036arbpenyahoocom@69.28.186.121>,
    > Adrienne Boswell <> wrote:
    >
    >> Gazing into my crystal ball I observed dorayme
    >> <> writing in news:doraymeRidThis-
    >> :
    >>
    >> > http://dorayme.150m.com/jokes/josephLottery.html
    >> >

    >>
    >> That's great... I forwarded it to my pastor for one of his homilies.

    >
    > Ah, well, perhaps your pastor could use this one too, a different
    > moral:
    >
    > http://dorayme.150m.com/jokes/godsHelp.html
    >


    Yup, that one, too.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Mar 5, 2006
    #15
    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. mason66
    Replies:
    0
    Views:
    432
    mason66
    Jul 27, 2006
  2. JWL
    Replies:
    4
    Views:
    601
    Michael Winter
    Sep 26, 2006
  3. jc
    Replies:
    3
    Views:
    1,769
  4. jc
    Replies:
    1
    Views:
    1,396
    Neredbojias
    Mar 19, 2008
  5. Dj Frenzy
    Replies:
    3
    Views:
    333
    Robert
    Feb 10, 2004
Loading...

Share This Page