Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

XHTML code and Internet Explorer

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
julioromano
n00b
n00b
Posts: 43
Joined: Fri Mar 19, 2004 6:54 pm
Location: Italy

XHTML code and Internet Explorer

  • Quote

Post by julioromano » Fri Apr 22, 2005 1:53 pm

Sorry, don't know if this is the best place to place this topic :D

However, have a look at this:

http://www.kjulio.net/new/

It looks good with all rendering engines I tried (Gecko, KHTML, Opera's) except Internet Explorer's which displays all the page scrolled to the right in a very strange way.

I know that IE has some compatibility concerns with XHTML and I wonder if someone can help me making this page viewable in IE while mantaining full XHTML1.1 compliance.

Thanks in advance.
Bye
Marco
Nothing lasts forever, even a diamond.
Top
Ansur
Tux's lil' helper
Tux's lil' helper
Posts: 84
Joined: Thu Jul 08, 2004 9:34 am
Location: Ireland

  • Quote

Post by Ansur » Fri Apr 22, 2005 2:41 pm

Code: Select all

#header
{
	background-image: url("../img/header.jpg");
	background-repeat:no-repeat;
	background-position:top;
	position:relative;
	top:0px;
	width:100%;
	height:75px;
	color:white;
}
#main
{
	position:relative;
	top: 75px;
	width:100%;
	height:auto;
}
So position:absolute must be set to relative
Real programmers don't document. If it was hard to write, it should be hard to understand.
Top
fzimper
n00b
n00b
Posts: 61
Joined: Fri Jan 17, 2003 6:16 pm
Location: Germany
Contact:
Contact fzimper
Website

  • Quote

Post by fzimper » Fri Apr 22, 2005 2:46 pm

Have you tried it with margin-left:auto and margin-right:auto ?

e.g.

Code: Select all

body
{
	margin-left:auto;
	margin-right:auto;
	font-family:serif;
	background-color:white;
	color:black;
	font-size: 14px ;
	font-family: "Arial" , serif ;
}
Top
Flammie
Retired Dev
Retired Dev
User avatar
Posts: 632
Joined: Mon Jun 02, 2003 9:48 pm
Location: Dublin, Ireland
Contact:
Contact Flammie
Website

  • Quote

Post by Flammie » Fri Apr 22, 2005 3:41 pm

IE doesn't support xhtml at all and that is not correct xhtml 1.1 anyways if IE displays it. Xhtml version 1.1 has requirement of serving files as Content-Type: application/xhtml+xml which brings up download dialog with IE the last I checked. If on the other hand you trick browsers with Content-Type: text/html, they will all parse it as html regardless of what doctypes you put in your source.

And yes, IE sucks with positioning, you are mostly best if you don't use anything newer than CSS 1 with IE.

But if you are concerned of your page's working in IE, why would you select XHTML anyway? IE has nil* support for xhtml, but works perfectly with html 4.01 strict, which is still w3c recommendation.

*) You can fool IE thinking that xhtml is valid html by using XHTML 1 standard appendix C definitions, but then you will lose xml compatibility and all other benefits of xhtml over html anyway, so it's really not worth it apart from fun experiment.
Top
julioromano
n00b
n00b
Posts: 43
Joined: Fri Mar 19, 2004 6:54 pm
Location: Italy

  • Quote

Post by julioromano » Sat Apr 23, 2005 1:12 pm

Wow what an answer, thank you so much guys.

I changed the mime type and the latest Internet Explorer 6 displays it without showing a download dialog.

I changed also position: to relative and now it is displayed correctly in every browser!

All right! Now I can go gold with my new site :D

Bye
Marco
Nothing lasts forever, even a diamond.
Top
kustos
Apprentice
Apprentice
User avatar
Posts: 168
Joined: Wed Sep 10, 2003 8:10 am

  • Quote

Post by kustos » Sat Apr 23, 2005 1:20 pm

Flammie wrote:IE doesn't support xhtml at all and that is not correct xhtml 1.1 anyways if IE displays it. Xhtml version 1.1 has requirement of serving files as Content-Type: application/xhtml+xml which brings up download dialog with IE the last I checked. If on the other hand you trick browsers with Content-Type: text/html, they will all parse it as html regardless of what doctypes you put in your source.

But if you are concerned of your page's working in IE, why would you select XHTML anyway? IE has nil* support for xhtml, but works perfectly with html 4.01 strict, which is still w3c recommendation.
That is not fully correct. IE just doesn't know the content type application/xhtml+xml. You can however add it via regedit32, then IE will no longer show the dialog but display the page.
Top
julioromano
n00b
n00b
Posts: 43
Joined: Fri Mar 19, 2004 6:54 pm
Location: Italy

  • Quote

Post by julioromano » Sat Apr 23, 2005 1:48 pm

Talked too early...

I played a bit with the absolute/relative attributes.

Now the display is correctly aligned but in some pages (those that are longer to fit in a single screen and thus need to scroll) the footer is missing (of course only in Internet Explorer).

The site URL has changed: http://www.kjulio.net

Anybody has suggestions?

Bye
Marco
Nothing lasts forever, even a diamond.
Top
Flammie
Retired Dev
Retired Dev
User avatar
Posts: 632
Joined: Mon Jun 02, 2003 9:48 pm
Location: Dublin, Ireland
Contact:
Contact Flammie
Website

  • Quote

Post by Flammie » Thu Apr 28, 2005 11:49 am

kustos wrote:That is not fully correct. IE just doesn't know the content type application/xhtml+xml. You can however add it via regedit32, then IE will no longer show the dialog but display the page.
The problem is, if your site is aimed at people who would use IE in the first place they won't be able to do anything that complicated anyways. And IE still hasn't anything xhtml support in the browser AFAIK, it just discards all odd slashes and such from the markup, and allows everything incorrect like it always has (xhtml and xml have the requirement for browser's to strictly require correct markup: if you open broken file in mozilla or opera you will only get validity error).
Top
kustos
Apprentice
Apprentice
User avatar
Posts: 168
Joined: Wed Sep 10, 2003 8:10 am

  • Quote

Post by kustos » Thu Apr 28, 2005 2:45 pm

Flammie wrote: The problem is, if your site is aimed at people who would use IE in the first place they won't be able to do anything that complicated anyways.
Is there anything you can do, with an ActiveX empowered browser? :wink:
Flammie wrote: And IE still hasn't anything xhtml support in the browser AFAIK, it just discards all odd slashes and such from the markup, and allows everything incorrect like it always has (xhtml and xml have the requirement for browser's to strictly require correct markup: if you open broken file in mozilla or opera you will only get validity error).
You are mixing to things here. Well formed xml and valid xhtml.
Mozilla and every other browser accepts invalid (x)html, no matter what mode.
Mozilla rejects not well formed xml, when it is delivired as application/xhtml+xml. But so does IE, one you add this content type. To test this save a non well formed xhtml as whatever.xhtml (not .html or .htm) and open it with IE.

And then, where is the difference between HTML 4.01 and XHTML 1.0 besides the later is well formed XML?
Top
Flammie
Retired Dev
Retired Dev
User avatar
Posts: 632
Joined: Mon Jun 02, 2003 9:48 pm
Location: Dublin, Ireland
Contact:
Contact Flammie
Website

  • Quote

Post by Flammie » Thu Apr 28, 2005 6:10 pm

kustos wrote:
Flammie wrote: The problem is, if your site is aimed at people who would use IE in the first place they won't be able to do anything that complicated anyways.
Is there anything you can do, with an ActiveX empowered browser? :wink:
Wow, a lots. Like update a broken browser/os component to a more broken version of os component/browser, and, uh, virus scan and delete contents of hard drive automatically \o/

(Now we ignore the fact that some sort of ActiveX can somehow be wanked into mozilla or perhaps even opera.)
You are mixing to things here. Well formed xml and valid xhtml.
Yeah, I was too lazy to check the terminology here :-)
Mozilla and every other browser accepts invalid (x)html, no matter what mode.
Mozilla rejects not well formed xml, when it is delivired as application/xhtml+xml. But so does IE, one you add this content type. To test this save a non well formed xhtml as whatever.xhtml (not .html or .htm) and open it with IE.
Oh, I did not know this. I've always believed in the usenet experts on the case of IE's support for xhtml, so I haven't tested beyond the download dialog.
And then, where is the difference between HTML 4.01 and XHTML 1.0 besides the later is well formed XML?
That's the point. There is no practical difference on yet, but the xhtml requires all kinds of tricks and tweaks and we still can't be sure it will work properly for the majority of users, so there's no point in using it, yet. Only reason I can see for using xhtml for most of people is to learn in hope that someday we can even make use of xhtml, but that day won't come before:
  1. IE with xhtml and xml support comes
  2. xml languages other than xhtml work with browsers out of the box, that is: Browsers will be able to display inlined svg, MathML and so forth, and play inlined SpeechXML and so on and so on...
  3. Proper XML-based editors and tools are available
Top
plasmagunman
l33t
l33t
User avatar
Posts: 604
Joined: Fri Jun 07, 2002 10:25 pm
Location: berlin

  • Quote

Post by plasmagunman » Fri Apr 29, 2005 8:21 am

Flammie wrote:
And then, where is the difference between HTML 4.01 and XHTML 1.0 besides the later is well formed XML?
That's the point. There is no practical difference on yet, but the xhtml requires all kinds of tricks and tweaks and we still can't be sure it will work properly for the majority of users, so there's no point in using it, yet.
no-no-no! i think we can be very sure that xhtml works very well with all kind of browsers. for an example, the wikipedia-pages are well formed and valid xhtml and i think they wouldn't do that if ~90% of internet users weren't able to visit this pages with their ie.

all difference between html 4.01 and xhtml 1.0 i can see is the obligation to close all tags. since that was allowed in html also there shouldn't be any problem with that. the difference between xhtml 1.0 transitional and xhtml 1.0 strict is just the ban of some attributes wich have to be replaced by css. of course some browsers have their problems with css, but there won't be any with the xhtml. last but not least xhtml 1.1 is (modulo attributes) identical to xhtml 1.0 strict. what do you mean by "all kinds of tricks"?

i don't see any reason, why we shouldn't use xhtml on a newly designed page. okay, the only reason i can think of is the absence of xhtml-valid editors, i'm not sure if they already exist...
please, feel free to correct my english. - por favor, corrige mi español.
Top
kustos
Apprentice
Apprentice
User avatar
Posts: 168
Joined: Wed Sep 10, 2003 8:10 am

  • Quote

Post by kustos » Fri Apr 29, 2005 1:28 pm

plasmagunman wrote: all difference between html 4.01 and xhtml 1.0 i can see is the obligation to close all tags. since that was allowed in html also there shouldn't be any problem with that.
And that the element names need to be lower case and I'm not sure if in html unquoted attribute values are allowed.
plasmagunman wrote: the difference between xhtml 1.0 transitional and xhtml 1.0 strict is just the ban of some attributes wich have to be replaced by css.
Wich is the same for HTML 4.01 transitional vs stirct.
Top
plasmagunman
l33t
l33t
User avatar
Posts: 604
Joined: Fri Jun 07, 2002 10:25 pm
Location: berlin

  • Quote

Post by plasmagunman » Fri Apr 29, 2005 1:35 pm

kustos wrote:
plasmagunman wrote: all difference between html 4.01 and xhtml 1.0 i can see is the obligation to close all tags. since that was allowed in html also there shouldn't be any problem with that.
And that the element names need to be lower case and I'm not sure if in html unquoted attribute values are allowed.
yes you're right, i forgot that.
please, feel free to correct my english. - por favor, corrige mi español.
Top
Flammie
Retired Dev
Retired Dev
User avatar
Posts: 632
Joined: Mon Jun 02, 2003 9:48 pm
Location: Dublin, Ireland
Contact:
Contact Flammie
Website

  • Quote

Post by Flammie » Fri Apr 29, 2005 2:32 pm

plasmagunman wrote:i think we can be very sure that xhtml works very well with all kind of browsers.
Well, you think wrong. There have just been said that a lot of users will need to hack registry to get it working.
for an example, the wikipedia-pages are well formed and valid xhtml and i think they wouldn't do that if ~90% of internet users weren't able to visit this pages with their ie.
Wikipedia is a prime example of enormous amount of stupid tricks you need to even get the poor xhtml 1.0 transitional broken appendix C working on browsers. Just read the source code of any html page there, everything from cdata hacks to IE conditionals is being used. Most of the misguided people using xhtml in their web pages don't even know what a doctype is or how to create IE conditional section.
i don't see any reason, why we shouldn't use xhtml on a newly designed page. okay, the only reason i can think of is the absence of xhtml-valid editors, i'm not sure if they already exist...
I don't see any reason to use xhtml. Do you?
Top
Post Reply

14 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic