I superimpose one drawing on the second, but the image is not displayed in the browser, but is displayed in the html-kit. Tell me how to solve this problem?

style:

.layer2 { background:url(images/image022.gif); background-repeat: no-repeat; background-position: center; height: "195"; width: "350"; position: absolute; top:"50";left:40%; } 

markup:

 <body> <td><div style="background:url(images/560.jpg) no-repeat top center;" width="990" height="163"> <div class="layer2 "> <td width="990" height="163" valign="top" style="background:url(images/560.jpg) top left no-repeat"></td> 
  • one
    101 010 - see the button? It is specially designed for code registration :) - Sh4dow
  • In the html-kit button is visible, but there are no browsers - DJK
  • In the editor, damn it, here, on the hashcode) It is unreadable in general. - Sh4dow
  • Maybe this is because the first picture covers the background, how can this be settled? - DJK

2 answers 2

At a minimum, remove the quotes from css (width and height) and add them to the image path. And it is advisable to master the full background syntax. And some kind of a jumble of classes and css, tags are weird ( <body><td> - how is this at all?)

 <style type="text/css"> .layer1 { position: absolute; width: 990px; height: 163px; background: transparent url('images/560.jpg') center center no-repeat; } .layer2 { position: absolute; height: 195px; width: 350px; background: transparent url('images/image022.gif') center center no-repeat; top: 50px; left:40%; } </style> <div class="layer1"></div> <div class="layer2"></div> 
  • <td> just copied a lot. It really is quotes Thank you! - DJK
  • Not at all, click the tick) And in general you have 0% received, it is not accepted here) - Sh4dow
  • Yes, there are extra quotes. - TiTaN

For the future: to draw divs at different levels, use the CSS property z-index: int