SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    perfect = good enough peach's Avatar
    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();});
              });
    thx in advance for any help

  2. #2
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,745
    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

  3. #3
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  4. #4
    perfect = good enough peach's Avatar
    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

  5. #5
    perfect = good enough peach's Avatar
    Join Date
    Jun 2004
    Location
    -Netherlands-
    Posts
    1,383
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JREAM View Post
    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
    Hmm the windowl load event gives me the same bugs as document ready

  6. #6
    perfect = good enough peach's Avatar
    Join Date
    Jun 2004
    Location
    -Netherlands-
    Posts
    1,383
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peach View Post
    Hmm the windowl load event gives me the same bugs as document ready
    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

  7. #7
    Django Jedi neron-fx's Avatar
    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 day Maybe 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/

  8. #8
    perfect = good enough peach's Avatar
    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

  9. #9
    Django Jedi neron-fx's Avatar
    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

Posting Permissions

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