473,389 Members | 1,082 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,389 software developers and data experts.

Layers (DIV) in Internet Explorer, print problem

zz
Sorry for posting this here but unfortunatly I couldn't find any appropriate
newsgroup for this and since I've been active here with .net question I
figured you guys might be able to help.
This is a link to a very simple page that contains 2 DIV statements:
http://xsinx.no-ip.com:8880/TestEmbedDiv.html

One of them is embeded in the other. There is some clipping involved (the
red layer is smaller than the yellow one). If you look at the print preview
in Internet Explorer 6, you can see the red layer but not the yellow one.
It's just a very basic example to demonstrate a problem we have.

Our "real" project involves generating web pages with multiple objects (ex:
images, videos, etc) which are each contained in their own layer which are
in turn all included in one big layer which controls clipping of those
objects. Needless to say, when we use print preview in our project, nothing
appears, we only get blank pages (the clipping layer is empty, except for
the other DIVs).

Anyone knows a work around to this problem, or can confirm it's a bug?

Any comment/suggestion is welcomed at this point, I'm lost.

Thanks,

Alex.
Dec 20 '05 #1
4 3101
Not sure exactly why this is happening - i'm sure someone else will though.
However , if you constrain the size of the outer div to the size of a
printed page , everything works fine.
You could move the style into a css and specify different (smaller )
dimensions for the printed style.
"zz" <zzz> wrote in message news:ey*************@TK2MSFTNGP15.phx.gbl...
Sorry for posting this here but unfortunatly I couldn't find any appropriate newsgroup for this and since I've been active here with .net question I
figured you guys might be able to help.
This is a link to a very simple page that contains 2 DIV statements:
http://xsinx.no-ip.com:8880/TestEmbedDiv.html

One of them is embeded in the other. There is some clipping involved (the
red layer is smaller than the yellow one). If you look at the print preview in Internet Explorer 6, you can see the red layer but not the yellow one.
It's just a very basic example to demonstrate a problem we have.

Our "real" project involves generating web pages with multiple objects (ex: images, videos, etc) which are each contained in their own layer which are
in turn all included in one big layer which controls clipping of those
objects. Needless to say, when we use print preview in our project, nothing appears, we only get blank pages (the clipping layer is empty, except for
the other DIVs).

Anyone knows a work around to this problem, or can confirm it's a bug?

Any comment/suggestion is welcomed at this point, I'm lost.

Thanks,

Alex.

Dec 20 '05 #2
zz
Thanks,

Do you have more info on that css method? We managed to fix part of our
problem by changing the clipping method (not sure exactly how, something
about not using overflow:off and something else instead -- I'm just relaying
questions here as the developper working on this isn't too fluent in
english).

The other problem we are having right now is that when we print, part of the
output is cut off.. ie: we only see about 750 pixels worth of the actual
site. Is there a way to specify X/Y origins for printing, or to scale
printing in any way?

Funny how we have none of these problems in FireFox :|

BTW if there is any forum more appropriate for these questions, please refer
me to them as I haven't found any.

Thanks again

Alex.
"gerry" <ge**@canada.com> wrote in message
news:eO**************@TK2MSFTNGP15.phx.gbl...
Not sure exactly why this is happening - i'm sure someone else will
though.
However , if you constrain the size of the outer div to the size of a
printed page , everything works fine.
You could move the style into a css and specify different (smaller )
dimensions for the printed style.
"zz" <zzz> wrote in message news:ey*************@TK2MSFTNGP15.phx.gbl...
Sorry for posting this here but unfortunatly I couldn't find any

appropriate
newsgroup for this and since I've been active here with .net question I
figured you guys might be able to help.
This is a link to a very simple page that contains 2 DIV statements:
http://xsinx.no-ip.com:8880/TestEmbedDiv.html

One of them is embeded in the other. There is some clipping involved (the
red layer is smaller than the yellow one). If you look at the print

preview
in Internet Explorer 6, you can see the red layer but not the yellow one.
It's just a very basic example to demonstrate a problem we have.

Our "real" project involves generating web pages with multiple objects

(ex:
images, videos, etc) which are each contained in their own layer which
are
in turn all included in one big layer which controls clipping of those
objects. Needless to say, when we use print preview in our project,

nothing
appears, we only get blank pages (the clipping layer is empty, except for
the other DIVs).

Anyone knows a work around to this problem, or can confirm it's a bug?

Any comment/suggestion is welcomed at this point, I'm lost.

Thanks,

Alex.


Dec 21 '05 #3
if you put your style info into .css style sheets or even inline styles, you
can override style setting that are used for print formatting by using the
media attribute.
try this for a quick example.

<HTML>
<head>

<!--
<link rel="stylesheet" type="text/css" href="browser.css">
<link rel="stylesheet" type="text/css" href="printer.css" media="print">
-->

<style>
div {
position:absolute;
overflow:hidden;
background-color:#ff0000;
left: 300px;
top: 100px;
width: 400px;
height:1200px;
}
.div2 {
background-color:#ffff00;
left: 20px;
top: 20px;
}
</style>

<style media='print'>
.div1 {
left: 10px;
top: 10px;
height:500px;
}
</style>

</head>
<body>
<DIV class="div1">
<DIV class="div2">
allo2
</DIV>
allo
</DIV>
</body>
</HTML>
"zz" <zzz> wrote in message news:Ou*************@TK2MSFTNGP15.phx.gbl...
Thanks,

Do you have more info on that css method? We managed to fix part of our
problem by changing the clipping method (not sure exactly how, something
about not using overflow:off and something else instead -- I'm just relaying questions here as the developper working on this isn't too fluent in
english).

The other problem we are having right now is that when we print, part of the output is cut off.. ie: we only see about 750 pixels worth of the actual
site. Is there a way to specify X/Y origins for printing, or to scale
printing in any way?

Funny how we have none of these problems in FireFox :|

BTW if there is any forum more appropriate for these questions, please refer me to them as I haven't found any.

Thanks again

Alex.
"gerry" <ge**@canada.com> wrote in message
news:eO**************@TK2MSFTNGP15.phx.gbl...
Not sure exactly why this is happening - i'm sure someone else will
though.
However , if you constrain the size of the outer div to the size of a
printed page , everything works fine.
You could move the style into a css and specify different (smaller )
dimensions for the printed style.
"zz" <zzz> wrote in message news:ey*************@TK2MSFTNGP15.phx.gbl...
Sorry for posting this here but unfortunatly I couldn't find any

appropriate
newsgroup for this and since I've been active here with .net question I
figured you guys might be able to help.
This is a link to a very simple page that contains 2 DIV statements:
http://xsinx.no-ip.com:8880/TestEmbedDiv.html

One of them is embeded in the other. There is some clipping involved (the red layer is smaller than the yellow one). If you look at the print

preview
in Internet Explorer 6, you can see the red layer but not the yellow one. It's just a very basic example to demonstrate a problem we have.

Our "real" project involves generating web pages with multiple objects

(ex:
images, videos, etc) which are each contained in their own layer which
are
in turn all included in one big layer which controls clipping of those
objects. Needless to say, when we use print preview in our project,

nothing
appears, we only get blank pages (the clipping layer is empty, except for the other DIVs).

Anyone knows a work around to this problem, or can confirm it's a bug?

Any comment/suggestion is welcomed at this point, I'm lost.

Thanks,

Alex.



Dec 22 '05 #4
zz
Hi again Gerry... Check end of message for a code example. Our project
involves placing objects and having events hide/show them as well as move
them around in some cases. In the example bellow, you can see we assign a X
to the object. Apparently, this resets the print position... Do you have any
idea how we can avoid this?

(the commented line moves the object, uncomment it to see the problem)

Thanks,

Alex.
<HTML>
<head>

<!--
<link rel="stylesheet" type="text/css" href="browser.css">
<link rel="stylesheet" type="text/css" href="printer.css" media="print">
-->

<style>
div {
position:absolute;
overflow:hidden;
left: 300;
top: 100;
width: 800;
height:1000;
}
</style>

<style media='print'>
.divprint {
left: 0;
top: 0;
height:100%;
width:100%;
}
</style>
</head>

<body>
<DIV id="mainpanel" class="divprint" STYLE="background-color:#ff0000;">
<DIV STYLE="background-color:#ffff00; left=20; top=50; width: 1000;
height:1200;">
allo2
</DIV>
allo
</DIV>
</body>

<script>
var obj=eval("mainpanel");
//obj.style.left=400;
</script>
</HTML>

"gerry" <ge**@canada.com> wrote in message
news:Oe*************@TK2MSFTNGP11.phx.gbl...
if you put your style info into .css style sheets or even inline styles,
you
can override style setting that are used for print formatting by using the
media attribute.
try this for a quick example.

<HTML>
<head>

<!--
<link rel="stylesheet" type="text/css" href="browser.css">
<link rel="stylesheet" type="text/css" href="printer.css"
media="print">
-->

<style>
div {
position:absolute;
overflow:hidden;
background-color:#ff0000;
left: 300px;
top: 100px;
width: 400px;
height:1200px;
}
.div2 {
background-color:#ffff00;
left: 20px;
top: 20px;
}
</style>

<style media='print'>
.div1 {
left: 10px;
top: 10px;
height:500px;
}
</style>

</head>
<body>
<DIV class="div1">
<DIV class="div2">
allo2
</DIV>
allo
</DIV>
</body>
</HTML>
"zz" <zzz> wrote in message news:Ou*************@TK2MSFTNGP15.phx.gbl...
Thanks,

Do you have more info on that css method? We managed to fix part of our
problem by changing the clipping method (not sure exactly how, something
about not using overflow:off and something else instead -- I'm just

relaying
questions here as the developper working on this isn't too fluent in
english).

The other problem we are having right now is that when we print, part of

the
output is cut off.. ie: we only see about 750 pixels worth of the actual
site. Is there a way to specify X/Y origins for printing, or to scale
printing in any way?

Funny how we have none of these problems in FireFox :|

BTW if there is any forum more appropriate for these questions, please

refer
me to them as I haven't found any.

Thanks again

Alex.
"gerry" <ge**@canada.com> wrote in message
news:eO**************@TK2MSFTNGP15.phx.gbl...
> Not sure exactly why this is happening - i'm sure someone else will
> though.
> However , if you constrain the size of the outer div to the size of a
> printed page , everything works fine.
> You could move the style into a css and specify different (smaller )
> dimensions for the printed style.
>
>
> "zz" <zzz> wrote in message
> news:ey*************@TK2MSFTNGP15.phx.gbl...
>> Sorry for posting this here but unfortunatly I couldn't find any
> appropriate
>> newsgroup for this and since I've been active here with .net question
>> I
>> figured you guys might be able to help.
>>
>>
>> This is a link to a very simple page that contains 2 DIV statements:
>> http://xsinx.no-ip.com:8880/TestEmbedDiv.html
>>
>> One of them is embeded in the other. There is some clipping involved (the >> red layer is smaller than the yellow one). If you look at the print
> preview
>> in Internet Explorer 6, you can see the red layer but not the yellow one. >> It's just a very basic example to demonstrate a problem we have.
>>
>> Our "real" project involves generating web pages with multiple objects
> (ex:
>> images, videos, etc) which are each contained in their own layer which
>> are
>> in turn all included in one big layer which controls clipping of those
>> objects. Needless to say, when we use print preview in our project,
> nothing
>> appears, we only get blank pages (the clipping layer is empty, except for >> the other DIVs).
>>
>> Anyone knows a work around to this problem, or can confirm it's a bug?
>>
>> Any comment/suggestion is welcomed at this point, I'm lost.
>>
>> Thanks,
>>
>> Alex.
>>
>>
>
>



Dec 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lizzy | last post by:
I have an internet application which has a progress bar show whenever the customer is requesting data from the server. This progress bar is coded to work in both Netscape 4.75 and above and IE 5.0...
6
by: David List | last post by:
I'm having a problem using different properties of the document object in the example javascripts in my textbook with browsers that identify themselves as using the Mozilla engine. One example of...
2
by: Catherine Lynn Wood | last post by:
I need to know how to overlap DIV content within 'relative' associated rendering. I am building div layers in the middle of a page and when I set positioning to absolute in the CSS, it references...
2
by: Marek Mänd | last post by:
I have simple structure like: <div> <h3 style="text-align:center;"> <span style="float:right;">input type="image"/></span> <span style="float:left;">input type="image"/></span> boxes titlebar...
4
by: PsychoCrow | last post by:
Hello everybody, I looked for my problem googling, but I found always similar answers about layer visualization. I expose my problem, I have tre layers: LAYER1 LAYER2 LAYER3 and I need to...
3
by: veganeater | last post by:
Hi, I'm wondering if there's a way that I can select which <div> to show based on the user's selection from a dropdown/listbox form. <form name="form1" method="post" action=""> <select...
5
by: Turner | last post by:
Hi there! I havent done anything in html for a while, about a few months ago, I had started working with layers, mainly just to have a background image that would not repeat over and over. I...
2
by: yawnmoth | last post by:
As I understand it, document.layers only works in Netscape 4+ (ie. it doesn't work in any version of Internet Explorer), while document.all only works in Internet Explorer 4+ (ie. it doesn't work...
2
by: rfeio | last post by:
Hello everyone, I'm using Dreamweaver 8 to create a simple web page and I'm using layers to design the layout. I have this layer where i want to put the Google "AdSense for Search". The layer...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.