auto-stretching in IE

E

Evert | Collab

Hi All,

I have a <div> in my XHTML1.1 file, with the style rules:

position: abolute;
top: 0px;
left: 10px;
right: 8px;
bottom: 24px;
margin-top: 100px;

As espected this works in Firefox, but it's giving me problems in IE 6.
Any idea's how to overcome this in a way that is according to standards?

regards,
Evert
 
M

Mark Parnell

Previously in alt.html said:
position: abolute;

Sp. "absolute".

Any idea's how to overcome this in a way that is according to standards?

Some sort of idea of what you are actually trying to do would be
helpful. A URL speaks a thousand words...
 
S

saz

Hi All,

I have a <div> in my XHTML1.1 file, with the style rules:

position: abolute;
top: 0px;
left: 10px;
right: 8px;
bottom: 24px;
margin-top: 100px;

As espected this works in Firefox, but it's giving me problems in IE 6.
Any idea's how to overcome this in a way that is according to standards?

regards,
Evert
Giving a URL would help, as the problem could be elsewhere. More
importantly, EXACTLY what are you trying to achieve.

BTW, you misspelled "absolute", which could be a major part of your
problem.
 
E

Evert | Collab

saz said:
Giving a URL would help, as the problem could be elsewhere. More
importantly, EXACTLY what are you trying to achieve.

BTW, you misspelled "absolute", which could be a major part of your
problem.

Yes you're right, I have spelled it correctly in my source though.. I'll
include an example in the bottom of the post.
If you want to see what I try to achief, open it in firefox; if you want
to see what goes wrong, open it in IE

Thanks for your time!

Evert

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test file</title>
<style type="text/css">
.container {
position: absolute;
top: 0px;
left: 10px;
right: 8px;
bottom: 24px;
margin-top: 100px;
border: 1px solid #000;
}
</style>
</head>
<body>
<div class="container">Yo</div>

</body>
</html>
 
D

dorayme

From: Evert | Collab said:
Hi All,

I have a <div> in my XHTML1.1 file, with the style rules:

position: abolute;
top: 0px;
left: 10px;
right: 8px;
bottom: 24px;
margin-top: 100px;

As espected this works in Firefox, but it's giving me problems in IE 6.
Any idea's how to overcome this in a way that is according to standards?


An "s" in abolute perhaps?

dorayme

(Sorry, I couldn't resist... don't kill me.)
 
S

Spartanicus

Evert | Collab said:
I have a <div> in my XHTML1.1 file

The exemption that XHTML that follows Appendix C guidelines may be
served as text/html only applies to XHTML 1.0.
 
E

Evert | Collab

Spartanicus said:
The exemption that XHTML that follows Appendix C guidelines may be
served as text/html only applies to XHTML 1.0.

I am aware of that, but this isn't really related to my problem.

Evert
 
E

Evert | Collab

Spartanicus said:
Then why are you violating the guidelines?

Who told you I was?

To specify this, I have use the following line of php code:

header('Content-Type: application/xhtml+xml; charset=utf-8');

the http-equiv meta tag is a replacement for a normal http header. It's
better to use the header, but if you can't for some reason you should
use the http-equiv.

thanks,
Evert
 
S

Spartanicus

Evert | Collab said:
Who told you I was?

You did by saying that you have an issue in IE, that means you are
serving it as text/html, or it wouldn't work at all in IE.
To specify this, I have use the following line of php code:

header('Content-Type: application/xhtml+xml; charset=utf-8');

the http-equiv meta tag is a replacement for a normal http header.

It's not. The http content-type header is the only thing that matters.
It's
better to use the header, but if you can't for some reason you should
use the http-equiv.

You *are* using the http header, and it says text/html. If you are not
able to change it, adding a meta declaration does not change the fact
that you are violating the guidelines.
 
E

Evert | Collab

You *are* using the http header, and it says text/html. If you are not
able to change it, adding a meta declaration does not change the fact
that you are violating the guidelines.

Please tell me where you read text/html

Evert
 
S

Spartanicus

Evert | Collab said:
Please tell me where you read text/html

I repeat: You have an issue in IE, that means you are
serving it as text/html, or it wouldn't work at all in IE.
 
E

Evert | Collab

Spartanicus said:
I repeat: You have an issue in IE, that means you are
serving it as text/html, or it wouldn't work at all in IE.

It does work in IE, it simply doesn't work as expected. Please try the
file I included and see what I mean.. Have you even checked it?

This is starting to look like a troll, I probably shouldn't respond to
this anymore..

I will try it on some other newsgroups

regards,
Evert
 
S

Spartanicus

Evert | Collab said:
It does work in IE, it simply doesn't work as expected. Please try the
file I included and see what I mean.. Have you even checked it?

We've been discussing your violation of w3c's guidelines for serving
XHTML 1.1. Not what you wanted to discuss? Welcome to usenet.
This is starting to look like a troll, I probably shouldn't respond to
this anymore..

I will try it on some other newsgroups

Running away won't fix your violation of the guidelines.
 
E

Evert | Collab

Spartanicus said:
We've been discussing your violation of w3c's guidelines for serving
XHTML 1.1. Not what you wanted to discuss? Welcome to usenet.




Running away won't fix your violation of the guidelines.

Allright,

Please explain it to me and pretend I'm stupid. What should I do to fix
my problem?

Evert
 
J

Jonathan N. Little

Evert said:
Allright,

Please explain it to me and pretend I'm stupid. What should I do to fix
my problem?

Evert

Ok, let's calm down here. What Spartanicus is trying to tell you is that
your are specifying your document as XHTML1.1, the problem is to be
valid XHTML1.1 the content type the server should send the document is
'application/xhtml+xml'.

see:
http://www.w3.org/TR/xhtml-media-types/xhtml-media-types.xhtml#summary

Now the problem here is IE does not support 'application/xhtml+xml' only
'text/html'. The fact that your see anything at all IE means the
document is being served as 'text/html' which means it is *not valid*
'XHTML1.1' but 'XHTML 1.0 Transitional'. Now this is not exactly the
problem you were asking about, but is a fundamental problem with your
situation, and DOCTYPE does effect the render mode of the browser. If
you have an invalid DOCTYPE the render mode of the browser will be
unpredictable. Fix your basic error first then we can address the
subsequent problems.
 
E

Evert | Collab

Ok, let's calm down here. What Spartanicus is trying to tell you is that
your are specifying your document as XHTML1.1, the problem is to be
valid XHTML1.1 the content type the server should send the document is
'application/xhtml+xml'.

see:
http://www.w3.org/TR/xhtml-media-types/xhtml-media-types.xhtml#summary

Now the problem here is IE does not support 'application/xhtml+xml' only
'text/html'. The fact that your see anything at all IE means the
document is being served as 'text/html' which means it is *not valid*
'XHTML1.1' but 'XHTML 1.0 Transitional'. Now this is not exactly the
problem you were asking about, but is a fundamental problem with your
situation, and DOCTYPE does effect the render mode of the browser. If
you have an invalid DOCTYPE the render mode of the browser will be
unpredictable. Fix your basic error first then we can address the
subsequent problems.
Thanks for clearing that up Jonathan

This makes a lot more sense now =) I immidiatly checked my script,
activated application/xhtml+xml and now I see IE doesn't parse it. I
really thought I had it like that before, but it now seems I didn't.
Sorry spartanicus for missing that, but I think I just needed a better
explanation.

I tried out both text/xml and application/xml. Firefox renders them
fine, but IE rambles about dtd problems.

So what does this mean. There is no way to use XHTML1.1 in a browser?
This means
http://www.w3.org/TR/xhtml-media-types/xhtml-media-types.xhtml#summary
(which also uses XHTML1.1 markup) is not valid (since it is served as
text/html).

If I'm correct I can change to XHTML 1.0 (HTML compatible). Just to be
sure, can I still use strict?

Thanks for pointing this out. I will give it a shot and hope it will
also fix my original problem

Evert
 
D

David Dorward

Evert said:
So what does this mean. There is no way to use XHTML1.1 in a browser?

Well ... you can serve it as application/xml and apply client side XSLT, but
that would be silly.
This means
http://www.w3.org/TR/xhtml-media-types/xhtml-media-types.xhtml#summary
(which also uses XHTML1.1 markup) is not valid (since it is served as
text/html).

It is served as application/xhtml+xml.

http://www.w3.org/TR/xhtml-media-types/ does content negotiation and sends
either XHTML 1.1 or HTML 4.01 depending on the accept header the browser
sends.

Its a complete waste of time.
If I'm correct I can change to XHTML 1.0 (HTML compatible). Just to be
sure, can I still use strict?

So long as you follow Appendix C, which makes it "compatible" with HTML -
which means it will work alright on /most/ browsers, but some will still
get it wrong as they foolishly beleve the HTML spec when it said that HTML
was an SGML application.

XHTML, even 1.0, is pretty much pointless on the client side for the vast
majority of websites.
 
S

Spartanicus

Jonathan N. Little said:
Ok, let's calm down here. What Spartanicus is trying to tell you is that
your are specifying your document as XHTML1.1, the problem is to be
valid XHTML1.1 the content type the server should send the document is
'application/xhtml+xml'.

Document validity depends on whether it conforms to the applicable DTD.
Serving XHTML 1.1 as text/html doesn't make the document invalid, but it
violates the guidelines as published by w3c.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top