473,320 Members | 1,920 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,320 software developers and data experts.

printing div problem

I'm not very good at css but from what I've read it is possible to print the content of a scrolling div. I have tried everything with no luck. From what I've found using a css for the print should work but doesn't seem to. Anyone know what I'm doing wrong?

<style type="text/css">
@media print
div#scroll{height:auto;
font-size:12px;
overflow:visible;
}
</style>
<body>
<div id="scroll" style="border: 1px solid #000000; overflow: hidden; width: 600px; height: 310px">
<div style="padding: 20px 10px; overflow: auto; width: 600px; height: 310px">
large amount of stuff
large amount of stuff
large amount of stuff
</div>
</div>
Sep 1 '07 #1
1 4045
phvfl
173 Expert 100+
I'm not very good at css but from what I've read it is possible to print the content of a scrolling div. I have tried everything with no luck. From what I've found using a css for the print should work but doesn't seem to. Anyone know what I'm doing wrong?

<style type="text/css">
@media print
div#scroll{height:auto;
font-size:12px;
overflow:visible;
}
</style>
<body>
<div id="scroll" style="border: 1px solid #000000; overflow: hidden; width: 600px; height: 310px">
<div style="padding: 20px 10px; overflow: auto; width: 600px; height: 310px">
large amount of stuff
large amount of stuff
large amount of stuff
</div>
</div>
Hi Moonman,

Welcome to TSDN...

Try putting braces around the styles so that the style element reads:
[HTML]
<style type="text/css">
@media print{
div#scroll{
height:auto;
font-size:12px;
overflow:visible;
}
}
</style>
[/HTML]
Sep 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are...
0
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are...
1
by: DCraig | last post by:
I'm having problems printing to a line printer from both Crystal Reports and SQL Server reporting services using dotnet. When I try and print a report from an application with Crystal I get the...
5
by: Stefania Scott | last post by:
I am trying to print a word document from Access. The code I've written works well in my computer but does not in the one were it is needed. Here the piece of code: 'doc path strObjectPath =...
5
by: C-Services Holland b.v. | last post by:
Hi all, I've run into a problem trying to print from vb.net (2002) in Windows 98. To test it I've setup a single form with a button and the following code: 'the form has a button called...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
2
by: Teemu | last post by:
I have an application created with VB6 and now I'm converting it to VB 2005. Conversion is not so simple because printing is so much different. In my app I have Timer-component, which is creates...
2
by: Sukh | last post by:
Hi I am stuck with a problem Can anyone help me out from this... I am printing a report on pre-printed continue paper using dot-matrix printer using vb.net. Data is printing on all the...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.