Jump to content

XHTML in IE 6 and 7


pompster

Recommended Posts

I have just started learning XHTML and CSS etc. I have been building pages using myEclipse and everything is going fine until now. I have created a page to learn how to use pseudo classes this works fine in Firefox but will not open in IE6. Instead of opening the page it asks if I want to save or open the page.MyEclipse saves the file as a .xht file and it seems to be this that is causing the problem, as if i change it to .html the file works. I guess what I need to know is; is there an issue with XHTML in IE or am I doing something wrong?Code below:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Pseudo_class.xhtml</title> <meta http-equiv="keywords" content="enter,your,keywords,here" /> <meta http-equiv="description" content="A short description of this page." /> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <style type="text/css"> p > b:first-child { font-family:verdana; font-size:20pt } </style> <!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> <p>The first <b><b>bold will also increase in size and change font</b></b> but the next in a paragraph will be just be<b> bold.</b> Due to the Pseudo-Class.</p> <p>The first <b><b>bold will also increase in size and change font</b></b> but the next in a paragraph will be just be<b> bold.</b> Due to the Pseudo-Class.</p> <p>The style syntax used is:<style type="text/css"> p < b:first-child{font-family:comic-sans;font-size:24pt}</style></p> <p>This will happen every time the <b> tag is a child within <p></p> </body></html>Any help for a beginner would be gratefully recievedPompster Steve

Link to comment
Share on other sites

Guest FirefoxRocks

IE 6 does support application/xml, but it doesn't support application/xhtml+xml, and neither does IE 7. application/xhtml+xml is the correct MIME type of XHTML documents, and is served with that MIME type with the file extension of .xht or .xhtml.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...