This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > December 2003 > DIV and clip rect width in IE and NS
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
DIV and clip rect width in IE and NS
|
|
| Alex NSB 2003-12-11, 8:26 pm |
| 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(0px, 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
| |
| Alex NSB 2003-12-15, 4:35 pm |
| Anyone? Or is this the wrong NG?
Alessandro
"Alex NSB" <alexnsb@tin.it> ha scritto nel messaggio
news:bra816$4n1$1@newsread.albacom.net...quote:
> 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(0px, 50px,
50px,quote:
> 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
displaysquote:
> "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
behavequote:
> the same way)?
>
> TIA.
>
> Alessandro
| |
|
|
"Alex NSB" <alexnsb@tin.it> wrote in message
news:brk097$kmt$1@newsread.albacom.net...quote:
> Anyone? Or is this the wrong NG?
>
> Alessandro
>
> "Alex NSB" <alexnsb@tin.it> ha scritto nel messaggio
> news:bra816$4n1$1@newsread.albacom.net...
> 50px,
> displays
> behave
>
>
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. ;)
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|