png buttons and graphics showing up badly in FireFox and Safari

W

Wintensive

Web page: www.wintensive.net

All graphics created in Photoshop CS. Mostly png buttons and basic
shapes with dropshadows. For some reason they all show up great in IE
but poorly in FireFox and Safari. The "Best Practices" graphic shows
up fine in all of them on the Data Backup page which I cannot
explain. What is the best approach at this point to create graphics
that are compatible with all browsers. Thanks.

I used png because they have transparent backgrounds which is
necessary for placing a button oon a background with more than one
color (or one that isn't all white for that matter) Thanks for any
and all suggestions!

Jason
wintensive at yahoo dot (com)
 
W

Wintensive

In OPTIONS>Web I have "Rely on VML" and "Allow PNG" selected
(checked). At first I noticed they were not so now I have selected
them, but there is no change on web after uploading the page after
making the change.
 
W

Wintensive

OK, I have now noticed that all PNG graphics show up with the
shadowing all pixelated. The "Best Practices" graphic is a jpg and
shows up fine. Is there a way to get PNG to show up well in all
browsers or do I need to change all of them to jpg. thanks again!
 
W

Wintensive

After the OPTIONS change to allow png and rely on vml there was one
change. The home page is now all black as if it shows only the
background. The rest of the pages are fine, with the exception of the
original problem with the dropshadows on all png images.
http://wintensive.net/index_files/Page367.htm
 
D

DavidF

Publisher makes copies of all inserted images, and in some cases in
different resolutions and even different formats of images. The goal is to
serve up the best image depending upon the browser. Unfortunately this works
less then well in some cases...such as yours. If you study the html output
and all the different images you can see some of these. And no, you can't
simply delete the ones you don't like.

Using http://www.wintensive.net/index_files/SecureDataBackup.htm as an
example page, your navigation buttons are not as good in FF as they are in
IE, but your "Best Practices" is. And if you look at the bottom of the page
the nav buttons are also fuzzy in FF along with the text.

First compare the buttons across the top of the page with your home page.
Notice that your home page the buttons are more clear. Why? Cuz your home
page is one big graphic...a .jpg, at least in FF:
http://www.wintensive.net/index_files/image297.jpg

And your best practices is also a .jpg in FF:
http://www.wintensive.net/index_files/image637.jpg

And the logo for Ibackup at the bottom of the page is also good...but is a
..gif:
http://www.wintensive.net/index_files/image605.gif

I would try a couple things....in no particular order:

Generally I suggest going to Tools > Options > Web tab and unchecking "Allow
PNG....". Try checking it since you are using .png files, and see if that
makes any difference....or unchecking it.

You have done some careful layouts, and I suspect grouped a lot of your
design elements including the buttons. Try ungrouping the images and see if
that makes any difference. Sometimes grouping can create a combined image,
such as http://www.wintensive.net/index_files/image609.jpg or perhaps even
your home page....and sometimes that can be a good thing in terms of the
quality of the image. However, the text cannot be read by the search engines
after it is converted to an image, so it should be avoided if possible...and
in general.

I am pretty sure that we talked about compressing the graphics before you
Publish to the Web. This will resize and resample the images to 96 dpi. If
your original images from Photoshop are not 96 dpi, then that alone will
create a different version than what you inserted. In fact if you optimized
your images to 72 dpi, then Publisher will try to resample up to 96 dpi
which can be pretty ugly. You might create your original images in 96 dpi
instead of 72.

If possible when you produce your images in Photoshop, size the images
exactly the size you want them to appear on your web page. Then after you
insert them into your page, right click, format picture, and go to the Size
tab. Make sure that the images are Scaled at 100%. I have found that
Publisher will tend to use the same image for IE and FF when you do this. In
fact, if you take the time to optimize your images, and then insert them at
100%, you need not use the compress graphics function in Publisher.

I understand why you are using .png files, but consider using .gif files
instead. That format supports transparency....the Ibackup logo is an
example. Hopefully you have gotten better results by the time you resort to
this fix and have to redo your images.

If you added drop shadows in Publisher, remove them. Unfortunately that
confuses Publisher and it creates a new image with the shadow...and lower
quality. Add the shadow in Photoshop if you want it.

Don't forget that you can direct the html output to your hard drive, and
right click the .htm files, open with FF to test your pages without
uploading them. I would do this as you experiment.

And finally, if you want the bestest images possible, then you should import
them into the web page rather than insert/embed them. If you want some
instructions on how to do that, let me know, but I have already typed too
much ;-)

DavidF
 
D

DavidF

I sent my message before reading this one. You can play with the "allow
PNG..." , but do not check "rely on VML..." That will create problems in FF
and other browsers.

DavidF
 
W

Wintensive

David - What a huge help!! I did not know about sampling and such.

I made all the images in PhotoShop, but did so at 72dpi
I did try to make them the size I needed so I didn't have to resize in
Pub, but when I did resize I used the size tab and changed them
keeping aspect ratio the same...just checked and scaling is 100% for
all
Some of the images are grouped for ease of moving them around
Home Page is one big layout with hotspot...it shows fine as you
mentioned and for the reasons you mentioned.
dropshadows are all in Photoshop, but "saved for web" as png
when I changes sizes in Pub I manually entered new dimensions in
pixels and kept all scaling at 100%

So it appears my options are as follows:

1) experiment with OPTIONS>WEB settings
2) ungroup images
3)change all png graphics in site to jpg/gif
4)Import rather than insert graphics - if you can offer brief
instructions I may try this as well.

And thanks again for the tutorial. All that information is very useful
in understanding what Pub does to your images and why they look the
way they do when published. Much appreciated response, David. Thanks
again!
 
D

DavidF

All the images in your Pub file will now be 100% scale, because you used the
compress graphics feature. That is part of what that does. It resamples and
resizes the image that you inserted. In fact by compressing the images, it
usually results in fewer or no multiple copies of the original image. As an
experiment, open one of the images in your html files in Photoshop, and look
at the dpi. It is probably 96. My point is that you probably "degraded" your
images by using the compress graphics feature if the original image was not
inserted at 100%, and at 72 dpi. In most cases this is not that big of
difference, but it can be.

I usually don't bother mentioning the import image option, because it does
require more work. In your case, you are already used to working in
Photoshop, and know how to optimize your images. I also generally don't
suggest it unless you really need optimal images, and after I describe the
process you will probably understand why...it can be tedious, and the return
on your investment in time might not be worth it.

In your case you can experiment as you already have original button images
optimized, I would assume. I would not necessarily go back and redo them at
96 dpi, but you might do one just to see if it is worth the extra effort.
Remember that 96 dpi is going to be a larger file size that a 72 dpi, and
thus will take longer to load. You do want your pages to load quickly.

The process is fairly straight forward. You create a subfolder on your host
server, and upload the images that you want to import. I would probably
concentrate on the buttons or the banner, as you are going to repeat those
on each page, and you will gain a loading advantage. The browser is going to
remember that it downloaded the button before, and will just use the cached
version on the computer, rather than download it again. Or in other words,
the second time a button loads, it will be much faster than the first time.

Next insert a html code fragment box. Move it over to the button that you
are going to import. Use the snap to feature to move the sides of the code
fragment box to be exactly the same as the button image. Now move the button
image into the scratch area, for now...maybe delete later...and leave the
code fragment box where the image was. Then open your original optimized
button image in Photoshop, and note the exact dimensions of the image. The
code snippet that you will paste into the code fragment box will be
something along these lines:

<A HREF="http://www.wintensive.net/index_files/Page367.htm"><IMG
SRC="http://www.wintensive.net/images/button-home.png" ALT="Wintensive Home
Page" border="0" width="120" height="60"></A>

The http://www.wintensive.net/index_files/Page367.htm part of the code
snippet is the link to Page367.htm on your site. I find it easiest to keep
things straight by writing absolute links. You might also decide to give
custom names to your pages so that the file name makes more sense, and the
links easier to write. For example Page367.htm is your Secure Backup Data
page, so you might call it "backup-data.htm", or BackupData.htm, or
Backup_Data.htm...just be sure to not have any spaces, and match upper and
lower case. To change the name of that page open you Pub doc, go to that
page, Tools > Web Page Options, and under Publish to the Web you will enter
the name you have chosen in the File Name field. (Note while you are in this
dialog, that this is also where you enter the keywords and description, and
title.) Now when you Publish to the Web, Publisher will name that
page...that file "BackupData.htm", which means the link to that page would
be changed to: http://www.wintensive.net/index_files/BackupData.htm Now, if
you are importing just an image and don't need the hyperlink, you do not use
this part at all...you would just use:

<IMG SRC="http://www.wintensive.net/images/button-home.png" ALT="Wintensive
Home Page" border="0" width="120" height="60"></A>

This part of the code snippet will tell the browser to look in the "images"
folder that you created on your server at the same directory level as the
index.htm file and the index_files folder, and where you have uploaded your
image file "button-home.png". The ALT is the ALT tag, which when you mouse
over the image will show as a tool tip, and will be read by the search
engines, and by the text readers for the visually impaired, and will be
viewed on the page while the image is loading. You can put any text you want
in that part. The width and height...the pixel width and height of the
button-home.png...remember telling you to note the dimensions? ;0)

Now when you a web page preview, provided that you did upload the button,
you will see that image appear...it will import. And that is about it. Like
I said, I think that if you are going to be repeating an image over and over
through your site, such as menu buttons, banners, etc, that importing them
makes sense. And if you want to see the image exactly as you produced it, by
bypassing the html coding engine in Publisher, then this also makes sense.
Some people don't like it because you don't have the visual clues for layout
on your Pub page, and of course it requires some skill and knowledge of how
to optimize and size the images in an image editor.

Just experiment a bit. Just create the images subfolder, and import images
to your web page through a webpage preview. Or Publish to the web, direct
the output to your computer where you can find it, and then browse to the
page that you want to test, right click, and open with FF, to see how it
will look in FF. You can even put an imported image right next to one that
you inserted, and see if the improved quality is worth the work.

Good luck...there was no brief way of describing this process...

DavidF
 
W

Wintensive

David, Again, thanks for all of your in depth helpful information. I
may proceed with this if necessary. Let me explain what I have done
so far:

At first neither checkbox for "use VML" or "allow PNG" were checked.
The graphics (other than jpg) looked horrible in that the dropshadows
were rendered badly in FF and Safari.

I tried checking both checkboxes and that did not help. In fact the
entire Home Page (a jpg) completely turned black, which is the
background color. So it disappeared.

Then I tried unchecking use VML but kept the allow PNG checked. This
was great! IE, FF and Safari all work now. The only exception to
this is that in Safari and FF the header banner on all pages but the
home page have disappeared. All the rest of the images are corrected
now. You almost can't tell that the header on the other pages is gone
if you didn't know what it was supposed to look like.

The header is the only image that is used on a Master Page in
Publisher so I am quite sure that is the problem. So I plan on not
using a master page at all, and making the banner a jpg and adding it
to all pages and then I should be good to go. If not I will explore
all other options you mentioned. In any case, the info you have
given in this article should prove very useful to anybody with any
image problems using publisher. Thanks again!

I have a new question about importing flash into the website created
in Publisher. Shall I create a new post? I want the testimonials
part of the Support Page to rotate through several testimonials I have
fading from one to another. I can create this in Flash, but I am not
sure that I can use a flash piece in a page created in Publisher...
 
D

DavidF

I have found no times where having the "allow VML..." option checked
helped. In fact, it has been removed from Pub 2007, and it is/was the
biggest reason for cross browser problems...as you found out. I don't use
PNGs, and have always used GIF for transparency, JPGs and TIF for print, but
it sounds like having that checked does help when you choose to use PNGs in
your site. And don't let me talk you out of using PNGs...I believe that they
offer some advantages over GIFs, including being "lossy". Thanks for the
feedback.

Yeah...its too bad, but using the master page just doesn't work in a web
publication, and anything you have on it won't show up in FF. Feel free to
convert your banner into a PNG if you like that format. And this is one of
those places where you can experiment with the importing of an image. Once
you write the code to import the banner, and put that on each page, then all
you need do to change out the banner image in the future, is switch the
image on your host...just upload the new image with the same name as before.
This will give you the same advantage as using a master page.

Flash? Use the insert html code fragment tool...
Reference: Using a SWF file (Flash) in Publisher :
http://msmvps.com/blogs/dbartosik/pages/81253.aspx

DavidF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top