473,473 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CSS Printing?

Hello,

I am new to CSS and therefore I am new to this forum.

I need some help with the "Print@Media" code. I have a site that was
created using DW layout table with inserted table cells. I need to print
the "main content" page with the scanned images on it...with a white BG, and
possible page breaks so the images won't get cut in half. I don't need the
Nav bars or header printed, just the images (content) in the main content
area in case clients want a printed pic of her product. Make sense?

This is my first commercial site and it is still a work in progress, so any
other advice will be greatly appreciated.

Scott


Aug 10 '05 #1
8 1605
Forgot to add the link:

www.naborow.com

Nav to some of the pic pages and you'll see the images. You might have to
try several, not all pics have been posted.

--
Scott
"gscott66" <gu*************@cox.net> wrote in message
news:pRrKe.2$Ix4.1@okepread03...
Hello,

I am new to CSS and therefore I am new to this forum.

I need some help with the "Print@Media" code. I have a site that was
created using DW layout table with inserted table cells. I need to print
the "main content" page with the scanned images on it...with a white BG,
and possible page breaks so the images won't get cut in half. I don't
need the Nav bars or header printed, just the images (content) in the main
content area in case clients want a printed pic of her product. Make
sense?

This is my first commercial site and it is still a work in progress, so
any other advice will be greatly appreciated.

Scott

Aug 10 '05 #2
"gscott66" <gu*************@cox.net> wrote:
I need some help with the "Print@Media" code.
Have you read the spec: http://www.w3.org/TR/CSS21/media.html ?
I have a site that was
created using DW layout table with inserted table cells. I need to print
the "main content" page with the scanned images on it...with a white BG
Restrict your main stylesheet to screen media, then all you should have
to do is switch off the things that you don't want to print with
display:none. For best reliability link in your stylesheets, add the
media qualifier to the link element, and also wrap the styles in an
@media wrapper. IE can get confused when you combine rules like so:

#nav,.sidebar{display:none}

To get around that specify each separately:

#nav{display:none}
..sidebar{display:none}
, and possible page breaks so the images won't get cut in half.
Leave it to the browser.
This is my first commercial site and it is still a work in progress, so any
other advice will be greatly appreciated.


Validating your markup and CSS is a start.

--
Spartanicus
Aug 10 '05 #3
OK! I think I got it to work...so far. But the page is still breaking half
way thru some images. Any advice on solving that with images? I have not
uploaded to the servver as of yet.

HTML:

<link rel="stylesheet" type="text/css" href="../naborow/print_style.css"
media="print" />

CSS:

body {
background: white;
}

#header {
display: none;
}

#leftnavbar {
display: none;
}

#topnavbar {
display: none;
}

#footernavbar {
display: none;
}

#maincontent {
width: auto;
border: 0;
margin: 0 5%;
padding: 0;
float: none !important;
font-size: inherit;
color: #000000;}

--
Scott

"Spartanicus" <in*****@invalid.invalid> wrote in message
news:29********************************@news.spart anicus.utvinternet.ie...
"gscott66" <gu*************@cox.net> wrote:
I need some help with the "Print@Media" code.


Have you read the spec: http://www.w3.org/TR/CSS21/media.html ?
I have a site that was
created using DW layout table with inserted table cells. I need to print
the "main content" page with the scanned images on it...with a white BG


Restrict your main stylesheet to screen media, then all you should have
to do is switch off the things that you don't want to print with
display:none. For best reliability link in your stylesheets, add the
media qualifier to the link element, and also wrap the styles in an
@media wrapper. IE can get confused when you combine rules like so:

#nav,.sidebar{display:none}

To get around that specify each separately:

#nav{display:none}
.sidebar{display:none}
, and possible page breaks so the images won't get cut in half.


Leave it to the browser.
This is my first commercial site and it is still a work in progress, so
any
other advice will be greatly appreciated.


Validating your markup and CSS is a start.

--
Spartanicus

Aug 11 '05 #4
"gscott66" <gu*************@cox.net> wrote:
OK! I think I got it to work...so far.
You got what to work?

Configure your software to use an attribute header above follow ups,
quote (a) minimal bit(s) of what you are replying to and intersperse
your reply beneath it.
But the page is still breaking half
way thru some images. Any advice on solving that with images?


[Browsing up the thread to see what you are on about]

Nothing you can do about that except advising users to use a browser
that doesn't print an image over 2 pages.

--
Spartanicus
Aug 11 '05 #5
1. """Configure your software to use an attribute header above follow ups,
quote (a) minimal bit(s) of what you are replying to and intersperse
your reply beneath it."""
I must have omitted that I am a newbie to all of this and the latter makes
absolutly no sense. Maybe this is the wrong forum for me...is there one for
people who are just beginning css?

2. """You got what to work?""""

The CSS print command that we're talking about....it's not perfect but it
does work....from the local side...I will test it on the server today.

Thanks for your input regarding the "dispaly:none"....

Scott


"Spartanicus" <in*****@invalid.invalid> wrote in message
news:2f********************************@news.spart anicus.utvinternet.ie... "gscott66" <gu*************@cox.net> wrote:
OK! I think I got it to work...so far.


You got what to work?

Configure your software to use an attribute header above follow ups,
quote (a) minimal bit(s) of what you are replying to and intersperse
your reply beneath it.
But the page is still breaking half
way thru some images. Any advice on solving that with images?


[Browsing up the thread to see what you are on about]

Nothing you can do about that except advising users to use a browser
that doesn't print an image over 2 pages.

--
Spartanicus

Aug 11 '05 #6
"gscott66" <gu*************@cox.net> wrote:
1. """Configure your software to use an attribute header above follow ups,
quote (a) minimal bit(s) of what you are replying to and intersperse
your reply beneath it."""
I must have omitted that I am a newbie to all of this


Being new to CSS has nothing to do with the group's rules (which are
nothing more than the default usenet posting rules).
and the latter makes absolutly no sense.


You are posting to a group that has a posting convention, whether you
agree with it or not is not the issue. If you want to participate you
are advised to follow the rules.

--
Spartanicus
Aug 11 '05 #7
Sorry...

I didn't realize you were referring to rules...I guess I am new at
everything.

What rules did I break or not follow? And I will gladly comply...

Thank you....

--
Scott


"Spartanicus" <in*****@invalid.invalid> wrote in message
news:tk********************************@news.spart anicus.utvinternet.ie...
"gscott66" <gu*************@cox.net> wrote:
1. """Configure your software to use an attribute header above follow ups,
quote (a) minimal bit(s) of what you are replying to and intersperse
your reply beneath it."""


I must have omitted that I am a newbie to all of this


Being new to CSS has nothing to do with the group's rules (which are
nothing more than the default usenet posting rules).
and the latter makes absolutly no sense.


You are posting to a group that has a posting convention, whether you
agree with it or not is not the issue. If you want to participate you
are advised to follow the rules.

--
Spartanicus

Aug 11 '05 #8
gscott66 wrote:
I didn't realize you were referring to rules...I guess I am new at
everything.

What rules did I break or not follow? And I will gladly comply...


I would rather call them _conventions_ than rules. They are an informal
set of "good practices" that most people here mostly follow, at least
those who figured writing articles that are easy to read and understand
is the best way to generate an interesting discussion, and possibly to
obtain a helpful answer.

One such convention that you (mistakenly) broke is proper quoting.
Please, when replying to an article, quote (a minimal number of)
sentences, or even just a few words, to give the context, attribute the
quote (with a string like "Daniel Déchelotte wrote:") and write your
reply/comment/further question below. Break the quote into several
pieces as relevant. That helps tremendously when following several
threads across several newgroups, like many of us do.

There are many "references" out there, for instance :
http://www.cs.indiana.edu/docproject...toc.html#SEC44
http://www.faqs.org/faqs/usenet/posting-rules/part1/
(short introduction: posting to Usenet is different from sending an email)

Good luck! (and "Welcome!" and "No worries!", too :))

--
Daniel Déchelotte
http://yo.dan.free.fr/
Aug 11 '05 #9

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

Similar topics

4
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been...
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...
9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
4
by: Suzanka | last post by:
Hello, I have an application written in C# on visual studio .NET. It is a web aplication. The application consists of many different forms, that users occassionaly want to print out for filing....
4
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
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...
0
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
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
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.