Css Error on First load, then layout gets better

Discussion in 'CSS' started by rkstech, May 31, 2008.

  1. #1
    rkstech, May 31, 2008 IP
  2. Skinzeeteam

    Skinzeeteam Peon

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It does seem ok to me...It downloaded ok, didnt have to refresh to see everything...if it helps my browser is Firefox 2.0.0.14 for Mac OSX 10.4.10
     
    Skinzeeteam, May 31, 2008 IP
  3. gina.alessia

    gina.alessia Well-Known Member

    Messages:
    449
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    110
    #3
    no problem on IE 7 and Firefox
     
    gina.alessia, May 31, 2008 IP
  4. rikun

    rikun Peon

    Messages:
    85
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's fine for me too, but your header image kinda sticks out of the rounded edges at the top.
     
    rikun, May 31, 2008 IP
  5. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #5
    OK guys thanks for your time.
     
    rkstech, Jun 1, 2008 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    I'm seeing what you mean here in opera 9.25 and 9.5 beta. On the first page load the 'vehicle types' are squished together, and the header is 'busting out' of the container. If I revisit the page (hit enter in the address bar) they jump to where they should be, but if I REFRESH the broken layout returns.

    This could be the opera positioning bug that's plagued me for a bit. I have a few lines of javascript I use to 'fix' it - it adds 1px padding to the body, then 30ms later removes it. Amazingly this tricks Opera into re-rendering the page properly.
    
    /* 
    	the following fixes Opera being a bit #DDD on loading
    	background images
    */
    
    function stageTwo() {
    	document.body.style.padding="0";
    }
    
    function initialize() {
    	if (navigator.userAgent.indexOf("Opera")>-1) {
    		document.body.style.padding="0 1px";
    		if (window.addEventListener){ 
    			window.addEventListener('load',stageTwo,false); 
    		} else if (window.attachEvent){ 
    			window.attachEvent("onload",stageTwo);
    		} else { 
    			window.onload=stageTwo;
    		}
    	}
    }
    
    Code (markup):
    I include that in the header, and call "initialize" right before the </body> tag.

    Not 100% sure that's the problem though - if you are seeing it in other browsers, then the above is a no go.

    You may also want to try fixing the 68 validation errors, as that likely means you are more relying on the error handling of the various browsers (which are different) than valid behaviors (which are different thanks to IE, but not as badly so)... You've got XHTML in your HTML doctype, enough inlined javascript to choke the DHTMLtards over at Dynamic Drive, tables that aren't even DOING anything (here's a big tip, if a table only has one TD, dont' use a table), presentational markup, hordes of unneccessary classes, paragraphs around entity spaces just to space out elements... It's a disaster.

    52k of markup for 1.2k of content - that alone should send up warning flags. Even with the forms I'd be amazed for that page to cross the 15k mark coded 'properly'. That you're saddled with that fat bloated jquery rubbish (that you don't actually seem to be USING for anything) surely can't be helping much either.
     
    deathshadow, Jun 1, 2008 IP
  7. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #7
    Thanks will implement this, Thanks for your time
     
    rkstech, Jun 1, 2008 IP
  8. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #8
    I had a similar problem here:

    First load the footer is not clearing, refresh the page and it clears to down the bottom where it should be.

    Never figured out why it did that.
     
    rochow, Jun 1, 2008 IP