HTML background with 2 images... impossible?

I want to create a webpage with a background image (marble) that is tiled to make up the main background but in the middle I want another image centered. Is there a way to do this? It can't just be an image centered (using an img tag) because I want to have text over top of it. I can't combine the 2 images to create an image the size of a browser window because different resolutions would show the image in different places, not centered.

Is this possible? Any help would really be appreciated.

Thanks.

Comments

  • simplest solution is to set the marble image to be the pages background image, then for the second image, use a table and set the tables background image

    [code]






    your page content goes here if you want it printed over the centered background image





    [/code]
    : I want to create a webpage with a background image (marble) that is tiled to make up the main background but in the middle I want another image centered. Is there a way to do this? It can't just be an image centered (using an img tag) because I want to have text over top of it. I can't combine the 2 images to create an image the size of a browser window because different resolutions would show the image in different places, not centered.
    :
    : Is this possible? Any help would really be appreciated.
    :
    : Thanks.
    :


  • If you have two elements and one should be covered by the other, use Z-Index which tells the browser which element has which priority:
    example:


    h1 {z-index:1;}
    h2 {z-index:2;}


    h2 is placed before h1.
    I hope that helped.
    *this is a cut from a discussion between Secret_Doom and me last year!

    : I want to create a webpage with a background image (marble) that is tiled to make up the main background but in the middle I want another image centered. Is there a way to do this? It can't just be an image centered (using an img tag) because I want to have text over top of it. I can't combine the 2 images to create an image the size of a browser window because different resolutions would show the image in different places, not centered.
    :
    : Is this possible? Any help would really be appreciated.
    :
    : Thanks.
    :

    Firestorm
    [email protected]
    ;-)

  • Thanks guys, that's some smart thinkin. I'll give it a try.






    : I want to create a webpage with a background image (marble) that is tiled to make up the main background but in the middle I want another image centered. Is there a way to do this? It can't just be an image centered (using an img tag) because I want to have text over top of it. I can't combine the 2 images to create an image the size of a browser window because different resolutions would show the image in different places, not centered.
    :
    : Is this possible? Any help would really be appreciated.
    :
    : Thanks.
    :

  • : Thanks guys, that's some smart thinkin. I'll give it a try.
    :
    :
    :
    :
    :
    :
    : : I want to create a webpage with a background image (marble) that is tiled to make up the main background but in the middle I want another image centered. Is there a way to do this? It can't just be an image centered (using an img tag) because I want to have text over top of it. I can't combine the 2 images to create an image the size of a browser window because different resolutions would show the image in different places, not centered.
    : :
    : : Is this possible? Any help would really be appreciated.
    : :
    : : Thanks.
    : :
    :
    :
    Hey I am Nirav I had got problem which is similar to yours only difference is I want to assign a TD of table, two different images as background,second image will overlap first.First image is of size of td and second one is a transparent image.Please help if any idea.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories