CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 11th, 2003, 05:11 AM
chili-mac chili-mac is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Marina Del Rey, CA
Posts: 6 chili-mac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool xhtml, custom tags, and css

PHP Code:
<!DOCTYPE html PUBLIC
    
"-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-Strict.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head><style type="text/css"><![CDATA[
mytag{
    
display:    block;
    
border:        1px solid black;
    
color:        green;
}
]]></
style></head><body>
   <
mytag>     Hello     </mytag>
</
body></html

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.

Reply With Quote
  #2  
Old December 11th, 2003, 12:37 PM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 8
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > xhtml, custom tags, and css


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway