SitePoint Sponsor |
|
User Tag List
Results 1 to 9 of 9
-
Jan 21, 2009, 09:40 #1
- Join Date
- Jun 2004
- Location
- -Netherlands-
- Posts
- 1,383
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
JQuery PNGfix causing layout problems
Im using the Jquery PNG Fix script, which works fine, but it causes layout probalems in ie6. I think this is because the original png images is removed and replaced while the browser is building the layout. This causes some of the boxes that contain png images to be too small to contain their content, because their width was set while the png was gone.
Im not sure what the best solution is but I can imagine this would be fixed if you just delay the pngfix script, can this maybe be done by replacing document.ready with the javascript onload thingy? how would that integrate with my loading script, it looks like this:
Code:$(document).ready(function(){ $(function(){$('div.content,').pngFix();}); });
-
Jan 21, 2009, 09:45 #2
- Join Date
- Nov 2005
- Location
- Trinidad
- Posts
- 3,746
- Mentioned
- 45 Post(s)
- Tagged
- 0 Thread(s)
My suggestion... don't use PNG 24's in this case, or find another PNG fix.
I use "iepngfix". Had no trouble with it so far.
Trying to fill the unforgiving minute
with sixty seconds' worth of distance run.
Update on Sitepoint's Migration to Discourse
-
Jan 21, 2009, 09:49 #3
You could try
$(window).onload(function(){ ... // wait this might not work try this if it doesnt below:
$(document).load(function(){ ...
to delay it, I've used iepngfix also and it was simple and easy also, never tried to JQuery
-
Jan 21, 2009, 09:49 #4
- Join Date
- Jun 2004
- Location
- -Netherlands-
- Posts
- 1,383
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yeah totally agree, pngfixes bring nothing but trouble. I add it as an option to some themes/templates I sell, apparantly some people demand this option.
but as to my question, how does the onLoad thing fit into my code?
edit:thx JREAM will try, you posted just a sec before I finished
-
Jan 21, 2009, 10:06 #5
-
Jan 21, 2009, 10:09 #6
- Join Date
- Jun 2004
- Location
- -Netherlands-
- Posts
- 1,383
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I tried changing it into (document).click and when I clicked, the layout messed up. So I guess its not a delay issue after all. maybe I better try another fix.
I've also noticed that the pngfix removes all margin padding and border from the images, guess I better check out some other pngfix scripts
-
Jan 21, 2009, 11:02 #7
- Join Date
- Sep 2007
- Location
- Bristol/Bath, UK
- Posts
- 274
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I too have had erratic results using the jQuery png fix. However the iepngfix stated above does work well and I have never had any problems with it.
Hopefully the png fix will be a fix that we can cast away on an old dvd into the back of a draw in a darkened room one dayMaybe when the IE6 market share falls.... we live in hope
*daydreams of a development world without IE6*
Neron-Fx
Everytime a user opens Internet Explorer, a web developer dies...
http://www.savethedevelopers.org/
-
Jan 21, 2009, 11:42 #8
- Join Date
- Jun 2004
- Location
- -Netherlands-
- Posts
- 1,383
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yeah, ie6 is totally stressing me out lately because Im working on complex layouts. We're all waiting on that magic number that will make ie6's market share small enough to ignore....
Just imagine your life without ie6
lol
-
Jan 21, 2009, 11:47 #9
- Join Date
- Sep 2007
- Location
- Bristol/Bath, UK
- Posts
- 274
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am looking forward to it! But I dont think it will be anytime soon
Neron-Fx
Everytime a user opens Internet Explorer, a web developer dies...
http://www.savethedevelopers.org/
Bookmarks