Html5 elements not rendering. Html5shiv.js not applying to pages - html

Im finishing my website and am now in the validation and browser testing stage.
So, my whole website has been converted to html5, as the default theme wasn't. After adding the conditional ie 9 comment to apply the html5shiv.js to browser versions below ie 9, some of the pages render properly and some do not.
Please view this page in Internet Explorer 8 (or ie9 but in version ie 8 from developer mode) to see the broken html5 page: http://www.gizmotrims.com/site/gizmotrims/music-ipods/1-ipod-nano.html
I troubleshooted this issue and wasn't able to find what is actually causing the pages to not render correctly and appear broken. Please note that not all of the pages have this problem, only a few. Its weird because some pages are fine and some aren't.
Could someone help me find this problem so I can finish the development of my site?

The path to js/html5shiv.js does not seem to work. You could change it to ../js/html5shiv.js, but that will probably ruin it for other pages. In this case you are better off using the absolute path (http://www.gizmotrims.com/site/gizmotrims/js/html5shiv.js) or a path relative to the root (/site/gizmotrims/js/html5shiv.js). You could also set a base[href], but that would affect other references as well.

Related

My page appears differently in IE 10 than in Chrome or Firefox

I am fairly new to HTML5 so please bear with me. I have designed a site for someone and when I view it in Firefox or Chrome, all is well, but when I view it in Internet Explorer 10, the nav menu and the picture in the header are moved downward. I have checked the site at http://validator.w3.org/ and it gave me some errors like alt is missing and some other minor things which I believe are irrelevant to what is causing this problem. Is there a way for me to override this with some type of Javascript code or is there some way of just making an IE 10 friendly version of the page in which someone who puts in the url of the page will be redirected to the IE version of the page?
Here is the url of the site: daxxomatic.com
Welcome to web programming and comparability issues. Internet explorer is the largest used web browser and the most horrific browser for web programmers.
You have to live with it and do one of the hacks for dealing with the problem. I would suggest that you follow web standards and check out www.caniuse.com to see if what you are doing can work on IE or Firefox or whatever.
Lastly, test your code in different browsers as you develop a project. That way you deal with small chunks of problems than a big one at the end.

IE8 rendering problems with h2

on a website I am working on I have problems with an rendering issue which I can't figure out.
I've already played with margins, positioning, z-indices and so on to get it away but nothing of that helped.
It only occurs in IE8 (under Windows XP, don`t know if on newer OS also). I know IE8 is a bit deprecated, but because the rest of the page is displaying fine with it I would also like to support it, since some of my visitors may have installed it.
If you take a look at the page you can identify the issue very fast when using IE8:
http://kunden.tommy-computer.at/fsv_noetsch/
Here is what the menu headers look like in modern browsers like FF/Chrome/Opera/IE>8:
And here is what they look like in IE8 (wrong):
How can I get rid of it. Please help, can`t figure it out why this happens. Thank you very much !
You are using the new html doctype and I noticed you are also using at least one html 5 element article. IE 8 won't recognize that element, or anything related to html 5. You need to use javascript to fix IE by using a script called html5shiv.
What this will do is inform IE of the new elements so they can be styled.

Hacks to make IE display like every other browser

I've been working on a PHP project for University, and as I'm rubbish at PHP I've left the design very simple so I can concentrate on the programming side of things. Now the programming is working I'm working on the design. The site looks fine in Chrome and other webkit browsers but in IE9 it looks awful. The main problems are...
1 - Background image expands the div to the full image size, whereas in webkit is only fills the div size.
2 - Content is not centred, instead it is floated left.
Does anyone know any scripts/hacks I can use to get IE to perform like every other browser? The only thing I'm using at the minute is Modernizr.
You can have a look at the site here if it helps - http://newmedia.leeds.ac.uk/ug10/cs10cwh/pod/index.php.
Modernizr can help, especially if you're using newer things like html5 and css3. Another thing that can help is boilerplate code, I personally like the html5reset.
One particular thing from that is going to help you a lot: if I look at your site in IE it says it goes into Quirks mode, making IE7, 8, and 9 behave... well... quirky :) Place the following meta tag in your head section to improve things for IE:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
You can see what "Browser Mode" and "Document Mode" IE is running in by bringing up the developer toolbar (F12), you can tweak it temporarily for your browsing session to see what happens if document mode is "IE9 standards".
A short update. You may also want to try using w3 validator. One of the errors it gives me for your site:
Line 1, Column 15: Comments seen before doctype. Internet Explorer will
go into the quirks mode.
There are also a few errors on unclosed tags, which can throw off rendering.
What we do is using a seperate .css for the IE versions and in the root we determine the browser and include that .css
So include your normal css for all browsers and for the IE versions include the specific .css file which overwrites the necessary party of the main stylesheet.
Edit: And like Jeroen said, force the IE to render in it's real mode, not some compatible or quirks thing.

Images Flash White in Internet Explorer 9 While Navigating

I am developing a website in XHTML 1.1/CSS 3.0 and I have a problem with Internet Explorer 9. Each time I change pages from "Home" to "Features" various images flash 'white' before filling in. This 'white flash' occurs each time the page is changed. I have seen numerous stack overflow posts discussing such errors but they seem to be for older versions of IE. The site looks fine in Chrome.
Here is what I've tried so far --
ran XHTML through validator (it passes).
ran CSS Level 3 validator (it passes).
tried setting background color to black.
tried changing CSS include format to import and back again (per previous stack overflow suggestion)
moved from HTML/XHTML Transitional to XHTML Strict
commented out images to identify a specific image or div -- seems that most of them do it.
tried empty Script tag hack (for flash of uninitialized content bug in IE)
tried adding meta tags to change cache settings so browser uses cache.
tried various IE browser-specific meta tags suggested for IE6, IE7, IE8 to try to 'fix' the behavior.
Any thoughts on what I can try next?
Thank you!
The flashing could be a side effect of having multiple layers of background images, including the shadow layer which stretches to fill the viewport. I'd try disabling those effects and seeing if that helps. Who knows how that might be affecting IE drawing the page...
You might find that putting gradient.png on #innerContent instead of #content makes more sense, and in doing that, you you won't need to use multiple BG images on a single element.

HTML page is appearing different in Mozilla Firefox and Internet Explorer

Hey guys, i have recently created a HTML page but it is appearing differently in Mozilla Firefox and Internet Explorer. I have uploaded the page on ripway. Here is the URL http://h1.ripway.com/gurusmith/My%20site/Index/index.html
Please watch the page in both Internet Explorer and Mozilla Firefox and after watching you will find that the page is appearing fine in Internet Explorer but not in Mozilla Firefox. Can anyone tell where i have made the problems. If anyone can edit the source code and post the correct source code here which works fine in both the browsers then i will be really thankful to you.
Sorry, i can't post the source code and the outputs due to restrictions but i have given the link above for the page. So please do visit it and help me.
Your page is not even remotely valid HTML. For one thing, you have two body elements.
Check out W3C Validation of your page for more problems.
If a browser gets invalid HTML it makes its best guess at what the DOM should be (as opposed to a deterministic interpretation). Since browsers are designed by independent teams, these interpretations will differ. Then, when it comes to applying CSS, variations are bond to occur.
Get your HTML in order and then see what happens.
Older versions of IE are known to display pages slightly differently than most "modern" browsers. A quick Google search turned up the following lists of common differences:
http://www.wipeout44.com/brain_food/css_ie_bug_fixes.asp
http://css-tricks.com/ie-css-bugs-thatll-get-you-every-time/