Results 1 to 10 of 10

Thread: PNG as background - opacity problems

  1. #1
    Join Date
    Jul 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PNG as background - opacity problems

    Hello!

    I'm doing a design and I need transparent PNG images to create a border. It works in firefox and opera but IE is causing major problems as always

    You can find my design here. If anyone knows a solution to this problem please let me know.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    IE6? IE7 has added PNG transparency support, but IE6 does not. This has been discussed before, and I believe there is an IE-only filter available to fake the same thing, so that should work for you. (IE-only is fine, since it only needs to fix IE6).

    If not, you could always use GIF instead.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jul 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Unfortunately GIF is not an option.

    I found this but I can't get it to work for me

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I know there is a filter-based solution, but I haven't used it myself, so I'm not sure. That looks like a good page to try, though. Good luck. Maybe someone else will have more info. Also, if you could paste a link to your page, perhaps someone could take a look and see what is wrong.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Try this:
    HTML Code:
    <!--[if IE]>
    <style>
    #container
    {
     background-image: none;
     filter:
    progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/YourImage.png,
    sizingMethod='scale');
    }
    </style>
    <![endif]-->
    Remember to add this AFTER your CSS Stylesheet.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  6. #6
    Join Date
    Jul 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I resolved most of the problems. I have one left.

    In IE background is only visible if height is specified. I would like to have min-height:400px; and then if more text is added I want to be fluid.

    Someone knows how to deal with this bug ?

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I believe there are other ways to display the background, like:

    position:relative;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Jul 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm not sure I know what you mean.

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In place of specifying a style width, specifying a style position (of absolute). The relative value is usually easier to work with in an established page, but I was mistaken, it says below that it needs to be absolute (relative might work). There are other options:

    The object that the filter is applied to must have layout before the filter effect will display. You can give the object layout by setting the height or width property, setting the position property to absolute, setting the writingMode property to tb-rl, or setting the contentEditable property to true.
    - from:

    http://msdn2.microsoft.com/en-us/library/ms532969.aspx

    Of interest in the above is the fact that you may set the height or the width. Setting just the width might work out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Jul 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Setting width worked. Thank you!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •