1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Marina Del Rey, CA
    Rep Power

    Cool xhtml, custom tags, and css

    PHP Code:

    "-//W3C//DTD XHTML 1.0 Strict//EN"
    html xmlns="http://www.w3.org/1999/xhtml">
    head><style type="text/css"><![CDATA[
    display:    block;
    border:        1px solid black;
    color:        green;
    mytag>     Hello     </mytag>
    The above code works perfectly well in Mozilla as long as it is served as 'application/xhtml+xml' as the mime type.

    IE, however does not understand this mime type and can't open the file. But, sent as 'text/html', neither broser applies the style.

    My question is: Does IE even have the ability to do what I'm trying to do. Can you pull off custom tags in IE without XSL or preprossessing it on the server first?

    Thank you.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Seattle WA
    Rep Power
    If you have a custom tag, you do not have an xhtml document. Hence you (probably?) shouldn't be serving it as "application/xhtml+xml". Even if it was valid xhtml, Iwouldn't serve it as that mime type since Explorer is too dumb to figure it out.

    What your document really is is "text/xml", since you can't really use the above type. You should change your mime-type, doctype, and xml name space accordingly. To be hontest though, I'm not sure how you would then use embedded html-like styles. Perhaps serving it as "text/html" would work...I serve some of my xhtml that way. I know you shouldn't, but there reallly isn't an alternative as long as Explorer continues to ignore the public standards and they have a 90% market share.
    Last edited by MJEggertson; December 11th, 2003 at 12:40 PM.

IMN logo majestic logo threadwatch logo seochat tools logo