Jump to content


Photo

HTML 5 not working in IE 7


  • Please log in to reply
7 replies to this topic

#1 Samikaze

Samikaze

    New member

  • New Members
  • 1 posts

Posted 22 March 2012 - 09:03 PM

Hello,

i have just bought a one year membership to the Killersite university. I have downloaded the project file for the HTML5 CSS3 project and put the folder on my desktop. When i view the index page in Firefox, everything is fine, but in IE 7, everything is all over the place. I know that in the videos the teacher talks about the code "lt IE9". Normally it should work with any browser. Is it only because the root folder is on my desktop and not online that IE7 do not display the site correctly?

Regards.
  • 0

#2 grabenair

grabenair

    Advanced Member

  • Member
  • PipPipPipPip
  • 361 posts
  • LocationIowa

Posted 22 March 2012 - 09:48 PM

You will be experiencing problems with this a lot with IE, well not so much sense IE9. We have to write what is called conditional comments to deal with this problem. Conditional comments in short are css rules that we write in a separate css file and link them to the page to deal with IE. You do not generally have to rewrite the hole style sheet just the css like changing the margin for example to make things line up in IE. If you look through the archives here you will find a lot on this.
If You are just starting out I would suggest that you get familiar with html and css and then work on the conditional comments as you progress. This is just my personal opinion.

Edited by grabenair, 22 March 2012 - 10:08 PM.

  • 0
Standards will change. But your website needs to remain in serving its audience.
My Portfolio site

#3 Wickham

Wickham

    Advanced Member

  • Advanced Member
  • PipPipPipPip
  • 1,732 posts
  • LocationSalisbury UK

Posted 23 March 2012 - 01:39 AM

Note that you have lt IE9 when there should be a space between IE and 9:-
<!--[if lt ie 9]> your different styles here  <![endif]-->

The above code should go in the head section AFTER the main stylesheet link or after the head section style tags so that it supersedes them. Styles written inline (inside html tags) will take priority over those in a conditional comment.

It should work from a local file or online.

the teacher talks about the code "lt IE9". Normally it should work with any browser.

The lt IE 9 conditional comment should work with all IE browsers less than IE 9 (assuming that your styles inside the conditional comment are appropriate and supported by the IE version).

Edited by Wickham, 23 March 2012 - 02:44 AM.

  • 0

#4 johnanderson

johnanderson

    Member

  • Member
  • PipPipPip
  • 63 posts

Posted 23 March 2012 - 02:23 AM

This might be a browser problem.. Report the error to support team of IE... I hope this is helpful to you..
  • 0

#5 grabenair

grabenair

    Advanced Member

  • Member
  • PipPipPipPip
  • 361 posts
  • LocationIowa

Posted 23 March 2012 - 10:06 AM

Try writing the conditional comment like this and see if it makes a difference

<!- -[if IE]>

<link rel=”stylesheet” type=”text/css” href=”whatever you named your style sheet”/>

<![endif]- ->

Edited by grabenair, 23 March 2012 - 10:08 AM.

  • 0
Standards will change. But your website needs to remain in serving its audience.
My Portfolio site

#6 brainusa

brainusa

    Member

  • Member
  • PipPip
  • 20 posts

Posted 19 June 2012 - 08:36 AM

HTML5 must require some capability into web browsers. IE 7 can not support coding system of HTML 5 so, it’s better to use any latest version of Internet Explorer as IE 8 or any advanced. You have said that your website working in Firefox browser at its best then there is no needs to make in changes in CSS or coding.

Edited by brainusa, 10 September 2012 - 05:45 AM.

  • 0
Spinxwebdesign.com – We take pride to have the best Web designer with years of experience in our team. http://www.spinxwebdesign.com/

#7 Dhanishta

Dhanishta

    Member

  • Member
  • PipPipPip
  • 66 posts
  • LocationIndia

Posted 19 October 2012 - 02:03 AM

To get HTML5 in your IE7 browser,you can use http://html5boilerplate.com/ together with http://code.google.com/p/html5shiv/ and you're good to go.
For some other cool features,like video in old IE, you need to use workarounds like Flash for video and Javascript libs for canvas.
  • 0

#8 Mick

Mick

    Member

  • Member
  • PipPip
  • 35 posts
  • LocationSan Francisco Bay Area

Posted 19 October 2012 - 06:22 AM

You would also want to add the following to the CSS file
right at/near the top:


/*html5 display rule */
address, article, aside, canvas, content, details,
figcaption, figure, footer, header, hgroup, nav,
menu, section, summary {
display: block;
}


As mentioned in a previous post, Google html5 shiv (or shim)
and copy/paste the code in the head section.
The current (Oct. 2012) code is this:

<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->


I learned the above from Ben Falk in a PHP class.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users