By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

DIV and clip rect width in IE and NS

P: n/a
Hi all.

Consider the following page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><TITLE>Test</TITLE>
<STYLE TYPE="text/css">
<!--
#mylayerDiv {position:absolute;left:50px;top:50px;clip:rect(0p x, 50px, 50px,
0px);color:white;background-color:blue;layer-background-color:blue;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV ID="mylayerDiv">This is my layer with a looooooooooooong text</DIV>
</BODY></HTML>

Opening it in IE6 I see the whole text in my DIV, while NS7.1 only displays
"This is m" (I suspect NS is correct).

How can I fix this (that is, what code should I use to make IE and NS behave
the same way)?

TIA.

Alessandro
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Anyone? Or is this the wrong NG?

Alessandro

"Alex NSB" <al*****@tin.it> ha scritto nel messaggio
news:br**********@newsread.albacom.net...
Hi all.

Consider the following page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><TITLE>Test</TITLE>
<STYLE TYPE="text/css">
<!--
#mylayerDiv {position:absolute;left:50px;top:50px;clip:rect(0p x, 50px, 50px, 0px);color:white;background-color:blue;layer-background-color:blue;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV ID="mylayerDiv">This is my layer with a looooooooooooong text</DIV>
</BODY></HTML>

Opening it in IE6 I see the whole text in my DIV, while NS7.1 only displays "This is m" (I suspect NS is correct).

How can I fix this (that is, what code should I use to make IE and NS behave the same way)?

TIA.

Alessandro

Jul 20 '05 #2

P: n/a

"Alex NSB" <al*****@tin.it> wrote in message
news:br**********@newsread.albacom.net...
Anyone? Or is this the wrong NG?

Alessandro

"Alex NSB" <al*****@tin.it> ha scritto nel messaggio
news:br**********@newsread.albacom.net...
Hi all.

Consider the following page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><TITLE>Test</TITLE>
<STYLE TYPE="text/css">
<!--
#mylayerDiv {position:absolute;left:50px;top:50px;clip:rect(0p x, 50px,

50px,
0px);color:white;background-color:blue;layer-background-color:blue;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV ID="mylayerDiv">This is my layer with a looooooooooooong text</DIV>
</BODY></HTML>

Opening it in IE6 I see the whole text in my DIV, while NS7.1 only

displays
"This is m" (I suspect NS is correct).

How can I fix this (that is, what code should I use to make IE and NS

behave
the same way)?

TIA.

Alessandro



Be aware, positioning is my weakest area. I'm still learning. From the small
amount I've learned, clipping just won't work right in IE, so I have no clue
how you could get the clipped effect in IE.

But if I remove clip:rect(0px, 50px, 50px, 0px); from your code, the IE
remains the same and the Opera (which has the same exact error you describe
in NN) changes to match - that'll make IE and NS behave the same way. ;)

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.