HTML & WEB-Design

Moderators: Jonathan
Number of threads: 1249
Number of posts: 3348

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
HTML background with 2 images... impossible? Posted by Scout on 30 Jan 2002 at 10:50 PM
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.
Report
Re: HTML background with 2 images... impossible? Posted by garwain on 31 Jan 2002 at 7:38 AM
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

<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY background=test2.gif>
<CENTER>
<TABLE background=test1.jpg width=95% height=95%>
<tr align=left valign=top>
<td>
your page content goes here if you want it printed over the centered background image
</td>
</tr>
</TABLE>
</CENTER>

</BODY>
</HTML>


: 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.
:


Report
Re: HTML background with 2 images... impossible? Posted by Firestorm on 31 Jan 2002 at 7:39 AM
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:
<head>
<style .......>
h1 {z-index:1;}
h2 {z-index:2;}
</style>
</head>
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
blue_surfer2000@yahoo.de


Report
Re: HTML background with 2 images... impossible? Posted by Scout on 31 Jan 2002 at 10:38 AM
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.
:

Report
Re: HTML background with 2 images... impossible? Posted by niravlvyas on 29 Dec 2008 at 4:38 AM
: 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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.