Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 06-30-2005, 06:21 AM Web page to print?
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Hi all,

I have a tableless 3 column page with a header

What is the best way of creating a print page without the right, left and header cells?
Do I have to create a site that is for printing? I obviously want to be able to select file > print.

Cheers

Steve
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
Register now for full access!
Old 06-30-2005, 10:35 AM
danburzo's Avatar
Skilled Talker

Posts: 82
Location: Bistrita RO
Trades: 0
you create a style sheet and insert it like this:
<link rel="stylesheet" type="text/css" href="print.css" media="print"/>

and put display:none or visibility:hidden for the elements you do not wish to show up on the printed page. The difference is that using dispay:none you remove the element from the page, whereas by using visibility:hidden you hide the element, but it still takes up space in the page. Use whichever better suits your needs.
danburzo is offline
Reply With Quote
View Public Profile
 
Old 06-30-2005, 11:19 AM
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Great.
How is the style sheet instantiated above the original though.
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 06-30-2005, 11:38 AM
danburzo's Avatar
Skilled Talker

Posts: 82
Location: Bistrita RO
Trades: 0
I didn't quite understand the question :P Or was it a question?
In your html code you need to have:
Code:
<link rel="stylesheet" type="text/css" href="mystyle.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="myprintstyle.css" media="print"/>
and the browser will choose the first stylesheet to show on screen and the second stylesheet to use when printing. This is done by specifying the media type.
danburzo is offline
Reply With Quote
View Public Profile
 
Old 07-04-2005, 08:31 AM
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Oh Great,
thanks you have actually answered the question for me.

Does this selection of the correct style sheet by the browser occur accross different browsers and versions of browser.

Cheers for your time.

Steve.
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 07-04-2005, 10:01 AM
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
I have an additional quesiton to ask related to a similar conversion required.

The print.css style sheet enable me to redefine classed for print. Is there a similar way of creating text only style sheet selection?

Cheers.

Steve
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 07-04-2005, 11:10 AM
danburzo's Avatar
Skilled Talker

Posts: 82
Location: Bistrita RO
Trades: 0
You can create as many stylesheets as you want, and then use a stylesheet switcher. A List Apart has some methods to create style switchers: http://search.atomz.com/search/?sp-q...p=All&sp-k=All
take the first four articles.
danburzo is offline
Reply With Quote
View Public Profile
 
Old 07-04-2005, 11:24 AM
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Thanks very much mate. Youve been a great help.

Steve
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 07-04-2005, 01:27 PM
danburzo's Avatar
Skilled Talker

Posts: 82
Location: Bistrita RO
Trades: 0
Glad I could help.
danburzo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Web page to print?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.62011 seconds with 12 queries