Png not working

This is a discussion on "Png not working" within the Graphics and 3D section. This forum, and the thread "Png not working are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Graphics and 3D

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old May 9th, 2006, 13:42
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
Png not working

I'm trying to do a shadow around the main wrap of my webpage:

www.crewsfx.com/greenginger

I use a Mac and it's fine on that, but on PC it doesn't work - it just goes grey or blue. I exported the shadow as a PNG from within Flash, then I opened it in Photoshop and saved it as a PNG, still no luck. What do you have to do?

I need it as a PNG so that the texture background shows through too. Can you use gifs or something, or what?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 9th, 2006, 13:56
Up'n'Coming Member
Join Date: Apr 2006
Location: Missouri
Age: 32
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

It is not a PC problem it is a Internet Explorer problem;
http://www.alistapart.com/articles/pngopacity/
http://homepage.ntlworld.com/bobosola/

It looks good in FF
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 9th, 2006, 14:12
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
Re: Png not working

how has he done it then?:

http://www.tokyocube.com/main.php

it works in ie on pc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 9th, 2006, 14:37
Up'n'Coming Member
Join Date: Apr 2006
Location: Missouri
Age: 32
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

The wrapper or container background is a gif file
http://www.tokyocube.com/img/bg/bg_page_shading.gif
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 9th, 2006, 16:08
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
Re: Png not working

thanks. how stupid of me not to think of that. However, this must mean he's made a gif that is wide enough to exceed the width of all browsers. is that correct?

Actually, i'm having problems with exactly how this achieved. Do you set the image as the background for the body? I've tried this and it doesn't centre. I've made an image that is 1500 px wide, has nothing in the centre 750px and has the line texture around the edge. But it doesn't work right. It doesn't go centred and it doesn't tile how i expected.

Last edited by timmytots; May 9th, 2006 at 17:59.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 9th, 2006, 20:47
Highly Reputable Member
Join Date: Aug 2005
Location: 3rd Branch Up, Old Oak.
Age: 48
Posts: 658
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

You could do it with three same-width images from the same file;
Split out the header and place it at the top of the page.
The footer at the bottom.
Then make a vertically repeating 1 px high image the page background.
Centre the lot, so they appear as one, and away u go.

The repeating 1px image will save on your page's size as well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old May 9th, 2006, 21:11
SuperMember

SuperMember
Join Date: Nov 2005
Location: England
Age: 27
Posts: 309
Thanks: 1
Thanked 0 Times in 0 Posts
Re: Png not working

I don't think u understand the predicament but...

I found this code:

background: #F2F2F2 url("../img/bg/bg_page_shading.gif") repeat-y top center;
text-align: center;

That obviously is the code for the body in the css, but i've done that for mine with no luck. What is the background image supposed to be? Size etc. Mine doesn't centre, it goes off to left.

cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old May 9th, 2006, 22:10
Highly Reputable Member
Join Date: Aug 2005
Location: 3rd Branch Up, Old Oak.
Age: 48
Posts: 658
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

body { text-align:center;font-family:Arial,Helvetica,sans-serif;font-size:76%;background:#f2f2f2 url('../img/bg/bg_page_shading.gif") repeat-y top center; }

Try this.
It's one of mine, into which I have pasted yr .gif details.
You can see which bits you may need to play with to suit your particular page.

Re the shade around the frame, I use an 'outer glow' on the frame ('wrap') layer and change the colour to grey (dark as you need and adjust the opacity). Change the layer style to 'normal'. This will give you a shadowy effect all around your page frame.

I do this all in one file and then carve it up into three separate images (as above) and insert separate coding for each into the new page.

Last edited by Legacy_Staff; May 9th, 2006 at 22:17.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old May 10th, 2006, 09:49
Highly Reputable Member
Join Date: Aug 2005
Location: 3rd Branch Up, Old Oak.
Age: 48
Posts: 658
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

Something else just occurred to me.

You will probably need to use jpg format.

The gradient used in a glow/shadow effect would appear too blocky/stripey if you use gif.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old May 10th, 2006, 14:03
Up'n'Coming Member
Join Date: Apr 2006
Location: Missouri
Age: 32
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

You could just use this
http://homepage.ntlworld.com/bobosola/pnghowto.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old May 13th, 2006, 15:26
Up'n'Coming Member
Join Date: Mar 2006
Location: East Sussex, UK
Age: 20
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Png not working

Script to correct transparency in IE:

Code: Select all
<head>    <!--[if lt IE 7]> <script type="text/javascript" src="JS/correctPNG.js"></script> <![endif]--></head>
Code: Select all
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
window.attachEvent("onload", correctPNG);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old May 14th, 2006, 07:06
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Re: Png not working

Quote:
Originally Posted by lesleindotcom
I dont think there is a fix for IE that works with BACKGROUND images.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
png, working

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS not working in IE? Jgag Web Page Design 2 Jun 5th, 2008 11:14
PNG - IE not working Phixon Web Page Design 3 Nov 30th, 2007 13:47
php not working? gsquare567 PHP Forum 10 Apr 24th, 2007 18:52
PHP not working toolmania1 PHP Forum 1 Nov 1st, 2006 05:57


All times are GMT. The time now is 01:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved