pquery Posted June 9, 2008 Share Posted June 9, 2008 I've created a style sheet which works perfectly in FF, but on the initial page load in IE7 the div which holds the person's information (#welcomeBox) is up about 100 pixels and to the right about another 30 pixels in IE until you click refresh on the page and then it goes back to where it's supposed to be. Most users would not do this (nor should they have to) Here is the style from my css: #welcomeBox { display: block; background-color: #4d84c4; font-family: Arial,sans; height: 150px; width: 165px; color: #ffffff; float: left; z-index: 50; margin-left: 10px; margin-top: 5px; padding-left: 10px; margin-right: 20px; } I'm not sure if it's the display:float that would cause this or what would make IE7 do this or if someone would have a decent solution (or hack even). This welcome box is on almost every single page and IE7 seems to be what over 90% of my visitors are using. thanks for your help / suggestions. Quote Link to comment https://forums.phpfreaks.com/topic/109406-solved-styles-acting-strangely-in-ie7-but-work-on-refresh/ Share on other sites More sharing options...
haku Posted June 10, 2008 Share Posted June 10, 2008 This kind of problem requires a link to even begin to solve. Quote Link to comment https://forums.phpfreaks.com/topic/109406-solved-styles-acting-strangely-in-ie7-but-work-on-refresh/#findComment-561657 Share on other sites More sharing options...
pquery Posted June 12, 2008 Author Share Posted June 12, 2008 I couldn't add a link because the site I'm building is only accessible from outside the network via VPN. I did however solve the problem and will say a little bit about what happened for other's who might encounter this at a later time. First let me say that this site was built in Smarty so it was the template (or .tpl) page(s) which I was having problems with. I had built a top (nav) bar to be included on almost every page and had put that {include file="nav.tpl) as the first line of my template file. THEN - I had my <HEAD> <include css>and <TITLE> tags. (I have a lot of custom scripts on most pages which don't seem to be served well by just the standard template.tpl file) Well, Firefox was smart enough to read that there was a stylesheet to include. but IE couldn't get past the fact that the <HEAD> tag was not the first set of tags on the page. Once I moved the {include file="nav"} below the closing </HEAD> tag and then refreshed the page(s), IE then read the link to the CSS and everything came out where it was supposed to and I could make my final style tweaks. Hope this helps another Smarty user. Quote Link to comment https://forums.phpfreaks.com/topic/109406-solved-styles-acting-strangely-in-ie7-but-work-on-refresh/#findComment-564367 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.