Body background

Discussion in 'ASP .Net Web Controls' started by ruca, Mar 1, 2004.

  1. ruca

    ruca Guest

    How can I set body background with an image, but centered and not tiled?

    When I put background="image1", it fills my page with the image many times.
    I only want to put at the beggining and centered. I don't won't to use <img
    src="image1"> because I have a choice menu that I want over the image.


    --

    Thank's (if you try to help me)
    Hope this help you (if I try to help you)
    ruca
     
    ruca, Mar 1, 2004
    #1
    1. Advertising

  2. IE only or all browsers. For all browsers, you will have to make a DIV with
    a Z-order that places it in back. This is easiest when you use the grid
    layout in Visual Studio .NET (ie, you set all items into DIVs). A Panel can
    be used to set the watermark in, as a panel control becomes a DIV when
    rendered.

    To see this in action (outside of VS.NET), you can go to:
    http://www.ricocheting.com/js/watermark.html

    To set a watermark for IE only, simply choose the body element (right click
    a page and go to properties in VS.NET) and set bgPropeties to fixed. That
    will cement the image as a watermark.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "ruca" <> wrote in message
    news:uS7aAb5$...
    > How can I set body background with an image, but centered and not tiled?
    >
    > When I put background="image1", it fills my page with the image many

    times.
    > I only want to put at the beggining and centered. I don't won't to use

    <img
    > src="image1"> because I have a choice menu that I want over the image.
    >
    >
    > --
    >
    > Thank's (if you try to help me)
    > Hope this help you (if I try to help you)
    > ruca
    >
    >
     
    Cowboy \(Gregory A. Beamer\), Mar 1, 2004
    #2
    1. Advertising

  3. ruca

    ruca Guest

    The question is:
    the image still appears many times in background and I only want that
    appears one time and centered.

    How?????????????


    --

    Thank's (if you try to help me)
    Hope this help you (if I try to help you)
    ruca




    "Cowboy (Gregory A. Beamer)" <> escreveu na
    mensagem news:eva7Eo5$...
    > IE only or all browsers. For all browsers, you will have to make a DIV

    with
    > a Z-order that places it in back. This is easiest when you use the grid
    > layout in Visual Studio .NET (ie, you set all items into DIVs). A Panel

    can
    > be used to set the watermark in, as a panel control becomes a DIV when
    > rendered.
    >
    > To see this in action (outside of VS.NET), you can go to:
    > http://www.ricocheting.com/js/watermark.html
    >
    > To set a watermark for IE only, simply choose the body element (right

    click
    > a page and go to properties in VS.NET) and set bgPropeties to fixed. That
    > will cement the image as a watermark.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > **********************************************************************
    > Think Outside the Box!
    > **********************************************************************
    > "ruca" <> wrote in message
    > news:uS7aAb5$...
    > > How can I set body background with an image, but centered and not tiled?
    > >
    > > When I put background="image1", it fills my page with the image many

    > times.
    > > I only want to put at the beggining and centered. I don't won't to use

    > <img
    > > src="image1"> because I have a choice menu that I want over the image.
    > >
    > >
    > > --
    > >
    > > Thank's (if you try to help me)
    > > Hope this help you (if I try to help you)
    > > ruca
    > >
    > >

    >
    >
     
    ruca, Mar 1, 2004
    #3
  4. Hi, ruca,

    You should do some reading on cascading style sheets, I think. Anyway, try:

    <body style="background: url(images/background.jpg) no-repeat center center
    transparent;">

    Just change "images/background.jpg" with the path+filename of your image.

    Greetings
    Martin
    "ruca" <> wrote in message
    news:uS7aAb5$...
    > How can I set body background with an image, but centered and not tiled?
    >
    > When I put background="image1", it fills my page with the image many

    times.
    > I only want to put at the beggining and centered. I don't won't to use

    <img
    > src="image1"> because I have a choice menu that I want over the image.
    >
    >
    > --
    >
    > Thank's (if you try to help me)
    > Hope this help you (if I try to help you)
    > ruca
    >
    >
     
    Martin Dechev, Mar 1, 2004
    #4
    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:
    718
    Dan Brussee
    Mar 2, 2004
  2. Just D.
    Replies:
    2
    Views:
    1,870
    Just D.
    Jan 12, 2005
  3. Michael

    Body Background

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

Share This Page