tags:

views:

142

answers:

4

Hi,

The banner on this page here (a work in progress), has the following structure

<div id="top">
  <div class="sidebox">
    <div class="boxhead">
      <h2>Chalets des Bouleaux</h2>
    </div>
    <div class="boxbody">
      <p>Tel. 819-444-4444</p>
      <p>Notre-Dame de Pontmain, Québec, Canada</p>
    </div>
  </div>
</div>

The div with class sidebox and all it's child elements make up the logo shown in the centre of the banner. The photo shown behind the banner is a background image of the top div. I would like the logo to appear as though it is floating on top of the photo, i.e. the photo shows through the white parts of the logo. Obviously this isn't happening at the moment, though I'm unsure why, because I've set the background color to transparent for all the elements of which the logo is composed.


Update:

The page that I linked to has changed so I've removed the link to avoid confustion. Please ignore this question and vote to close it!

+1  A: 

The background of your GIFs are white! Make them transparent!

Gabriel Hurley
This will not really work (or will produce a really fugly result) because GIFs only have binary transparency, whereas because of his drop-shadow he will need semi-transparency.
Jason Berry
The best way is actually changing it with png format. Because png supports transparent backgrounds. Gif doesn't support it.
Braveyard
Well GIF does support transparency, just not alpha-channel transparency (like PNG does), which is what he needs.
Jason Berry
GIF transparency would work fine, but would have very poorly anti-aliased edges. PNGs suffer from the IE6 issues (and associated issues of hacks to make them work), and also suffer from rendering bugs if you try to animate them... oh when will the web have a single transparent image standard that works everywhere! ;-)
Gabriel Hurley
A: 
 <div id="top" style="background-image:url(backgroundimagepath)">
  <div class="sidebox">
    <div class="boxhead">
      <h2>Chalets des Bouleaux</h2>
    </div>
    <div class="boxbody">
      <p>Tel. 819-444-4444</p>
      <p>Notre-Dame de Pontmain, Québec, Canada</p>
    </div>
  </div>
</div>

Change it in this way and also sidebox should have a transparent background.

Braveyard
Some one always votes me down :)
Braveyard
+1  A: 

You need to replace the images of the sidebox with ones that have transparent backgrounds.

These images:

images/sbbody-r.gif
images/sbhead-r.gif
images/sbbody-l.gif
images/sbhead-r.gif
Aziz
+1  A: 

The following images will need to be recreated as 24-bit PNG's with semi-transparent backgrounds:

  • sbhead-l.gif
  • sbbody-l.gif
  • sbbody-r.gif
  • sbhead-r.gif

If you need the transparency in IE6 then you should use something similar to SuperSleight to patch up the holes.

Jason Berry
Keep in mind that if you do choose to use transparent PNGs, they will look like shit in IE6.
Paul McMillan
Added IE6 fix method. Works well for all the sites I've done it on.
Jason Berry