Printing a DIV
- the_Maven
- Graduate


- Joined: Feb 02, 2004
- Posts: 196
- Status: Offline
This is another issue I am facing at the moment. I am developing a site for a class project with a scrollable div on each page. On one of the pages the stuff in the content div ( <div id="content"> ) is extra long. I was wondering if there was a way to print just the div. This is an offshoot of the iframe problem i was facing earlier, but iframes are not allowed in XHTML. hence I'm using the div. If it makes any difference, I am not using the z-index property in the style sheet for the content div.
Thanks for any help with this.
maven
Thanks for any help with this.
maven
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
October 7th, 2004, 10:16 am
- neksus
- Mastermind


- Joined: Sep 10, 2004
- Posts: 2194
- Loc: Canada
- Status: Offline
- digitalMedia
- a.k.a. dM


- Joined: Dec 29, 2003
- Posts: 5169
- Loc: SC-USA
- Status: Offline
- the_Maven
- Graduate


- Joined: Feb 02, 2004
- Posts: 196
- Status: Offline
- digitalMedia
- a.k.a. dM


- Joined: Dec 29, 2003
- Posts: 5169
- Loc: SC-USA
- Status: Offline
- the_Maven
- Graduate


- Joined: Feb 02, 2004
- Posts: 196
- Status: Offline
Hey digitalMedia, The other time I just skimmed through it. I read it this time and I think i get what you are saying now. on the page you referred me to there is this example:
So if I just wanted to print out the one div i would do this...?
Question though: even if the styling for the div (on the screen) is already set in another rule on the style sheet, do i have to move the formatting to the @media rule?
Code: [ Select ]
@media print {
body { font-size: 10pt }
}
@media screen {
body { font-size: 13px }
}
@media screen, print {
body { line-height: 1.2 }
}
body { font-size: 10pt }
}
@media screen {
body { font-size: 13px }
}
@media screen, print {
body { line-height: 1.2 }
}
- @media print {
- body { font-size: 10pt }
- }
- @media screen {
- body { font-size: 13px }
- }
- @media screen, print {
- body { line-height: 1.2 }
- }
So if I just wanted to print out the one div i would do this...?
Code: [ Select ]
@media print {
#content { font-size: 10pt }
}
@media screen {
#content { font-size: 13px }
}
@media screen, print {
#content { line-height: 1.2 }
}
#content { font-size: 10pt }
}
@media screen {
#content { font-size: 13px }
}
@media screen, print {
#content { line-height: 1.2 }
}
- @media print {
- #content { font-size: 10pt }
- }
- @media screen {
- #content { font-size: 13px }
- }
- @media screen, print {
- #content { line-height: 1.2 }
- }
Question though: even if the styling for the div (on the screen) is already set in another rule on the style sheet, do i have to move the formatting to the @media rule?
- digitalMedia
- a.k.a. dM


- Joined: Dec 29, 2003
- Posts: 5169
- Loc: SC-USA
- Status: Offline
I think this is a bit tricky the first time you go through it. What I've done is set up and example for you.
Here's the code I've used:
...and here you can see it in action:
http://www.chriscarney.com/cleanMe/CSSMedia/HTML401.htm
You should only have to use the "Print Preview" function in your browser to see it working.
To be honest, my head is not really in the game this morning so, please, bear with me.
With in each section, or combined section, the trick is having counterparts for each part of the definition. So, I've defined my #left selector to display:none; int the print section. In my screen section, I need to have a the counterpart display:block; .
For the body selector, I've just reused the same definition, although I could have used a combined section (i.e. @media screen, print) for definitions that apply to both.
Using this technique, you should be able to apply any number of definitions to your CSS, for both screen and print media.
Does this help? If it doesn't, let's keep this conversation going. This is a capability of CSS that I get very excited about, having worked in corporate atmospheres where EVERYTHING gets printed.
Here's the code I've used:
Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Only Print the "center" DIV</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
@media print
{
body{font-family:georgia,times,sans-serif;}
#left{display:none;}
#center{display:block;}
#right{display:none;}
}
@media screen
{
body{font-family:arial,verdana,sans-serif;}
#left{display:block;margin:20px;}
#center{display:block;margin:20px;}
#right{display:block;margin:20px;}
}
</style></head>
<body>
<div id="left">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio. </div>
<div id="center">
Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc., li tot Europa usa li sam vocabularium. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilitá de un nov lingua franca: on refusa continuar payar custosi traductores. It solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. </div>
<div id="right">
Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental: in fact, it va esser Occidental. A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es.</div></body></html>
<html>
<head>
<title>Only Print the "center" DIV</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
@media print
{
body{font-family:georgia,times,sans-serif;}
#left{display:none;}
#center{display:block;}
#right{display:none;}
}
@media screen
{
body{font-family:arial,verdana,sans-serif;}
#left{display:block;margin:20px;}
#center{display:block;margin:20px;}
#right{display:block;margin:20px;}
}
</style></head>
<body>
<div id="left">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio. </div>
<div id="center">
Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc., li tot Europa usa li sam vocabularium. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilitá de un nov lingua franca: on refusa continuar payar custosi traductores. It solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. </div>
<div id="right">
Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental: in fact, it va esser Occidental. A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es.</div></body></html>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>Only Print the "center" DIV</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style>
- @media print
- {
- body{font-family:georgia,times,sans-serif;}
- #left{display:none;}
- #center{display:block;}
- #right{display:none;}
- }
- @media screen
- {
- body{font-family:arial,verdana,sans-serif;}
- #left{display:block;margin:20px;}
- #center{display:block;margin:20px;}
- #right{display:block;margin:20px;}
- }
- </style></head>
- <body>
- <div id="left">
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio. </div>
- <div id="center">
- Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc., li tot Europa usa li sam vocabularium. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilitá de un nov lingua franca: on refusa continuar payar custosi traductores. It solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. </div>
- <div id="right">
- Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental: in fact, it va esser Occidental. A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es.</div></body></html>
...and here you can see it in action:
http://www.chriscarney.com/cleanMe/CSSMedia/HTML401.htm
You should only have to use the "Print Preview" function in your browser to see it working.
To be honest, my head is not really in the game this morning so, please, bear with me.
With in each section, or combined section, the trick is having counterparts for each part of the definition. So, I've defined my #left selector to display:none; int the print section. In my screen section, I need to have a the counterpart display:block; .
For the body selector, I've just reused the same definition, although I could have used a combined section (i.e. @media screen, print) for definitions that apply to both.
Using this technique, you should be able to apply any number of definitions to your CSS, for both screen and print media.
Does this help? If it doesn't, let's keep this conversation going. This is a capability of CSS that I get very excited about, having worked in corporate atmospheres where EVERYTHING gets printed.
- dM
- the_Maven
- Graduate


- Joined: Feb 02, 2004
- Posts: 196
- Status: Offline
- digitalMedia
- a.k.a. dM


- Joined: Dec 29, 2003
- Posts: 5169
- Loc: SC-USA
- Status: Offline
- the_Maven
- Graduate


- Joined: Feb 02, 2004
- Posts: 196
- Status: Offline
you'll have to scroll down a bit to get to the div im talking about. it is under the bold text
Code: [ Select ]
<body><div><br /><table><tr><td class="top" colspan="2">
<a href="http://www.ces.ncsu.edu/" onmouseover="window.status='North Carolina Community Extension Home';return true"
onmouseout="window.status='';"><img alt="North Carolina Community Extension Home" src="images/ces1.gif" width="518" height="115"
class="logo" /></a><a href="http://www.co.guilford.nc.us/" onmouseover="window.status='Guilford County Home Page';return true"
onmouseout="window.status='';"><img alt="Guilford County Home Page" class="county" src="images/guilford.gif" /></a></td></tr>
<tr><td class="headbar" colspan="2"><span class="text">
<a onmouseover="window.status='Guilford County Center Home';return true" onmouseout="window.status='';"
href="index.html">Guilford</a> ¦
<a onmouseover="window.status='Guilford County Center Home';return true" onmouseout="window.status='';" href="index.html">
Plan of Work 2004</a></span><span class="date"><script type="text/javascript" src="scripts/date.js"></script> </span></td></tr>
<tr><td class="menu" rowspan="2">
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Guilford County Center Home';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="index.html" style="text-decoration:none">guilford home</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='See what events are coming soon!';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';"><a style="text-decoration:none" href=
"http://www.ces.ncsu.edu/Events/search.php?range_choice=thismonth&audience=e&reach=c-41&program_area=All&lrp=All&s=&Submit=Search">
event calendar</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='See our current weather forecast';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="http://www.w3.weather.com/weather/local/USNC0280?from=search_city" style="text-decoration:none">local weather</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Meet our faculty members';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="staff/staff.html" style="text-decoration:none">faculty & staff</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Read our newsletters';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="newsletters/news.html" style="text-decoration:none">ces newsletters</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Guilford County Plan of Work 2004';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="pow.html" style="text-decoration:none">plan of work</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Family Activities, 4-H, and more';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="family/family.html" style="text-decoration:none">family & youth</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Gardening Home';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="garden/garden.html" style="text-decoration:none">gardening home</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Horticulture Home';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="horticulture/horticulture.html" style="text-decoration:none">horticulture home</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Links of Interest';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="links.html" style="text-decoration:none">important links</a></div>
</td><td class="main">
<b>HERE IS THE DIV</b>
<div id="content"><hr /><span class="subhead">Guilford County Plan of Work – January 1, 2004</span><hr />
<span class="subhead">executive summary</span><br />
As part of the eleven-county Piedmont Triad region, Guilford County is centered along the piedmont industrial crescent stretching from
Raleigh to Charlotte. With a population of 421,000, Guilford County is ranked third in the state. Major cities include Greensboro
(224,000) and High Point (86,000). The public school system serves 60,000 students, along with eight colleges, universities and a
community college system that serve a total of 29,000 students. The county's traditional employment base of textiles, apparel and
furniture has diversified greatly in the last fifty years. Capital investment of over $l.2 billion by new and expanding firms created
27,000 new jobs in the past ten years. An excellent transportation infrastructure, including two interstate highways, Piedmont Triad
International Airport and available rail and truck service, has helped to solidify the county's position as a major distribution and
transportation center in the Southeast.<br />
Agriculture continues to be an integral part of Guilford County, creating a blend of urban and rural. The 2002 Agricultural income for the
county was $84,472,594. Top commodities include field crops, nursery and greenhouse operations, livestock, and horses. The nursery and
greenhouse industry is a rapidly growing industry which alone represents almost 50 million dollars. Farmers continue to look at a
alternative choices in order to diversify along with the traditional means of conducting business.
Each member of the Guilford County staff conducted an environmental scan which provided an overall summary of needs that should be
addressed. Means of achieving this information included: surveys posted on our website, 1809 surveys mailed/faxed/emailed or
hand-delivered to the public along with sixteen personal interviews.
</div></td></tr></table></div></body>
<a href="http://www.ces.ncsu.edu/" onmouseover="window.status='North Carolina Community Extension Home';return true"
onmouseout="window.status='';"><img alt="North Carolina Community Extension Home" src="images/ces1.gif" width="518" height="115"
class="logo" /></a><a href="http://www.co.guilford.nc.us/" onmouseover="window.status='Guilford County Home Page';return true"
onmouseout="window.status='';"><img alt="Guilford County Home Page" class="county" src="images/guilford.gif" /></a></td></tr>
<tr><td class="headbar" colspan="2"><span class="text">
<a onmouseover="window.status='Guilford County Center Home';return true" onmouseout="window.status='';"
href="index.html">Guilford</a> ¦
<a onmouseover="window.status='Guilford County Center Home';return true" onmouseout="window.status='';" href="index.html">
Plan of Work 2004</a></span><span class="date"><script type="text/javascript" src="scripts/date.js"></script> </span></td></tr>
<tr><td class="menu" rowspan="2">
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Guilford County Center Home';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="index.html" style="text-decoration:none">guilford home</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='See what events are coming soon!';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';"><a style="text-decoration:none" href=
"http://www.ces.ncsu.edu/Events/search.php?range_choice=thismonth&audience=e&reach=c-41&program_area=All&lrp=All&s=&Submit=Search">
event calendar</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='See our current weather forecast';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="http://www.w3.weather.com/weather/local/USNC0280?from=search_city" style="text-decoration:none">local weather</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Meet our faculty members';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="staff/staff.html" style="text-decoration:none">faculty & staff</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Read our newsletters';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="newsletters/news.html" style="text-decoration:none">ces newsletters</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Guilford County Plan of Work 2004';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="pow.html" style="text-decoration:none">plan of work</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Family Activities, 4-H, and more';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="family/family.html" style="text-decoration:none">family & youth</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Gardening Home';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="garden/garden.html" style="text-decoration:none">gardening home</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Horticulture Home';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="horticulture/horticulture.html" style="text-decoration:none">horticulture home</a></div>
<div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Links of Interest';return true"
onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
<a href="links.html" style="text-decoration:none">important links</a></div>
</td><td class="main">
<b>HERE IS THE DIV</b>
<div id="content"><hr /><span class="subhead">Guilford County Plan of Work – January 1, 2004</span><hr />
<span class="subhead">executive summary</span><br />
As part of the eleven-county Piedmont Triad region, Guilford County is centered along the piedmont industrial crescent stretching from
Raleigh to Charlotte. With a population of 421,000, Guilford County is ranked third in the state. Major cities include Greensboro
(224,000) and High Point (86,000). The public school system serves 60,000 students, along with eight colleges, universities and a
community college system that serve a total of 29,000 students. The county's traditional employment base of textiles, apparel and
furniture has diversified greatly in the last fifty years. Capital investment of over $l.2 billion by new and expanding firms created
27,000 new jobs in the past ten years. An excellent transportation infrastructure, including two interstate highways, Piedmont Triad
International Airport and available rail and truck service, has helped to solidify the county's position as a major distribution and
transportation center in the Southeast.<br />
Agriculture continues to be an integral part of Guilford County, creating a blend of urban and rural. The 2002 Agricultural income for the
county was $84,472,594. Top commodities include field crops, nursery and greenhouse operations, livestock, and horses. The nursery and
greenhouse industry is a rapidly growing industry which alone represents almost 50 million dollars. Farmers continue to look at a
alternative choices in order to diversify along with the traditional means of conducting business.
Each member of the Guilford County staff conducted an environmental scan which provided an overall summary of needs that should be
addressed. Means of achieving this information included: surveys posted on our website, 1809 surveys mailed/faxed/emailed or
hand-delivered to the public along with sixteen personal interviews.
</div></td></tr></table></div></body>
- <body><div><br /><table><tr><td class="top" colspan="2">
- <a href="http://www.ces.ncsu.edu/" onmouseover="window.status='North Carolina Community Extension Home';return true"
- onmouseout="window.status='';"><img alt="North Carolina Community Extension Home" src="images/ces1.gif" width="518" height="115"
- class="logo" /></a><a href="http://www.co.guilford.nc.us/" onmouseover="window.status='Guilford County Home Page';return true"
- onmouseout="window.status='';"><img alt="Guilford County Home Page" class="county" src="images/guilford.gif" /></a></td></tr>
- <tr><td class="headbar" colspan="2"><span class="text">
- <a onmouseover="window.status='Guilford County Center Home';return true" onmouseout="window.status='';"
- href="index.html">Guilford</a> ¦
- <a onmouseover="window.status='Guilford County Center Home';return true" onmouseout="window.status='';" href="index.html">
- Plan of Work 2004</a></span><span class="date"><script type="text/javascript" src="scripts/date.js"></script> </span></td></tr>
- <tr><td class="menu" rowspan="2">
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Guilford County Center Home';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="index.html" style="text-decoration:none">guilford home</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='See what events are coming soon!';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';"><a style="text-decoration:none" href=
- "http://www.ces.ncsu.edu/Events/search.php?range_choice=thismonth&audience=e&reach=c-41&program_area=All&lrp=All&s=&Submit=Search">
- event calendar</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='See our current weather forecast';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="http://www.w3.weather.com/weather/local/USNC0280?from=search_city" style="text-decoration:none">local weather</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Meet our faculty members';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="staff/staff.html" style="text-decoration:none">faculty & staff</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Read our newsletters';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="newsletters/news.html" style="text-decoration:none">ces newsletters</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Guilford County Plan of Work 2004';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="pow.html" style="text-decoration:none">plan of work</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Family Activities, 4-H, and more';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="family/family.html" style="text-decoration:none">family & youth</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Gardening Home';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="garden/garden.html" style="text-decoration:none">gardening home</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Horticulture Home';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="horticulture/horticulture.html" style="text-decoration:none">horticulture home</a></div>
- <div class="button" onmouseover="this.style.backgroundColor='#ffffff'; window.status='Links of Interest';return true"
- onmouseout="this.style.backgroundColor='#0099ff'; window.status='';">
- <a href="links.html" style="text-decoration:none">important links</a></div>
- </td><td class="main">
- <b>HERE IS THE DIV</b>
- <div id="content"><hr /><span class="subhead">Guilford County Plan of Work – January 1, 2004</span><hr />
- <span class="subhead">executive summary</span><br />
- As part of the eleven-county Piedmont Triad region, Guilford County is centered along the piedmont industrial crescent stretching from
- Raleigh to Charlotte. With a population of 421,000, Guilford County is ranked third in the state. Major cities include Greensboro
- (224,000) and High Point (86,000). The public school system serves 60,000 students, along with eight colleges, universities and a
- community college system that serve a total of 29,000 students. The county's traditional employment base of textiles, apparel and
- furniture has diversified greatly in the last fifty years. Capital investment of over $l.2 billion by new and expanding firms created
- 27,000 new jobs in the past ten years. An excellent transportation infrastructure, including two interstate highways, Piedmont Triad
- International Airport and available rail and truck service, has helped to solidify the county's position as a major distribution and
- transportation center in the Southeast.<br />
- Agriculture continues to be an integral part of Guilford County, creating a blend of urban and rural. The 2002 Agricultural income for the
- county was $84,472,594. Top commodities include field crops, nursery and greenhouse operations, livestock, and horses. The nursery and
- greenhouse industry is a rapidly growing industry which alone represents almost 50 million dollars. Farmers continue to look at a
- alternative choices in order to diversify along with the traditional means of conducting business.
- Each member of the Guilford County staff conducted an environmental scan which provided an overall summary of needs that should be
- addressed. Means of achieving this information included: surveys posted on our website, 1809 surveys mailed/faxed/emailed or
- hand-delivered to the public along with sixteen personal interviews.
- </div></td></tr></table></div></body>
- hashim
- Born


- Joined: Nov 06, 2006
- Posts: 1
- Loc: India
- Status: Offline
Hi. I am facing the same issue as 'the_Maven' and my sample code is similar to what is posted above.
Let me explain the issue I am facing:
I have some contents inside DIV and I have a print button at the bottom of the page.when I click on the 'print' button,it should print only the contents of the DIV and not any other part of the page.
I have visited the link mantioned:
http://www.w3.org/TR/2003/WD-CSS21-2003 ... media-rule
but I am not very sure how to implement it, as I am not comfortable using styles.
I really apppreciate any guidance on this.
Thanks in advance
Hashim
Let me explain the issue I am facing:
I have some contents inside DIV and I have a print button at the bottom of the page.when I click on the 'print' button,it should print only the contents of the DIV and not any other part of the page.
I have visited the link mantioned:
http://www.w3.org/TR/2003/WD-CSS21-2003 ... media-rule
but I am not very sure how to implement it, as I am not comfortable using styles.
I really apppreciate any guidance on this.
Thanks in advance
Hashim
- metalfury
- Born


- Joined: Jul 01, 2010
- Posts: 1
- Status: Offline
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 12 posts
- Users browsing this forum: No registered users and 92 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
