![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
body div class="one"><img src="./1.gif" /></div |
|
div class="two"><table class="content">.....</table></div |
|
/body body {background-image: url(./bg.gif);} .one { position: absolute; top:214px; z-index:1; } .two {z-index:100;} |
|
.content {background-color:#fff;} The reason why i want todo it like this is, that the background image is a pattern, but this one image should only be once in there, not multiple times. |
#3
| |||
| |||
|
|
*Oliver* <oliver_summa (AT) web (DOT) de>: body div class="one"><img src="./1.gif" /></div Why the 'div'? |
|
div class="two"><table class="content">.....</table></div Why the 'div'? |
#4
| ||||
| ||||
|
|
*Oliver* <oliver_summa (AT) web (DOT) de>: body div class="one"><img src="./1.gif" /></div Why the 'div'? |
|
div class="two"><table class="content">.....</table></div Why the 'div'? |
|
/body body {background-image: url(./bg.gif);} .one { position: absolute; top:214px; z-index:1; } .two {z-index:100;} ".two" is not positioned ('static'), thus 'z-index' does not apply. |
|
.content {background-color:#fff;} The reason why i want todo it like this is, that the background image is a pattern, but this one image should only be once in there, not multiple times. Why don't you put it into 'background' of the 'table' then? Set 'background-position' and 'background-repeat' accordingly. That would result in something like body><table class="content">.....</table></body body {background-image: url(./bg.gif)} .content {background: white url(./1.gif) 0 214px no-repeat} |
#5
| |||
| |||
|
|
Because the table is samller than where the image should appear. The image should always be on the very left of the screen, while the table is centered to the screen. Thus i can't put that image into the background of the table. Thanks anyhow, u have another idea? |
#6
| |||
| |||
|
|
Christoph Paeper schrieb: ".two" is not positioned ('static'), thus 'z-index' does not apply. position:static; didn't help, change anything |
|
The reason why i want todo it like this is, that the background image is a pattern, but this one image should only be once in there, Why don't you put it into 'background' of the 'table' then? Because the table is samller than where the image should appear. |
#7
| |||
| |||
|
|
.two {z-index:100;} ".two" is not positioned ('static'), thus 'z-index' does not apply. position:static; didn't help, change anything |
#8
| |||
| |||
|
|
.two {z-index:100;} ".two" is not positioned ('static'), thus 'z-index' does not apply. position:static; didn't help, change anything |
#9
| |||
| |||
|
|
position:static; didn't help, change anything |
#10
| |||
| |||
|
|
Oliver wrote: Because the table is samller than where the image should appear. The image should always be on the very left of the screen, while the table is centered to the screen. Thus i can't put that image into the background of the table. Thanks anyhow, u have another idea? You have a positioned image partially obscurred by an overlapping table and the image is greater than the table itself. The position of the image and that of the table are required to remain as is. The image is required to extend into the table as a background image of the table. The solution here is to keep the image which is partially hidden by the table, use the same image as a background image in the table and position this background image such that it seems that it is one image extending into the table are. The idea is that if the background image is moved outside of (beyond) the table border, that portion will not be visible. Since the background image applied to the table is background-attachment:scroll by default, the reference is to the top and left edges of the table. So by applying negative values to background-position for the background image of the table until it abuts seamlessly with the other identical image will result in what seems to be one complete image. i.e. background: white url(./1.gif) no-repeat -??px -/+??px; If the requirement is to have the image portion outside of table to also be a background image, then place the table inside a div and apply the image also as a background image to the div using the same declaration as for the table but with different positive background-position values. It may also be necessary to position the div itself depending on the need. In anticipation of further difficulties, it may also be necessary to place the table within another immediate div in order to position the table. The concept is simple - the solution and explanation longer than I expected or I went into too much detail and hopefully did not confuse. hey, |
![]() |
| Thread Tools | |
| Display Modes | |
| |