homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

CSS Print ignore cell & contents?
Want to not print menu and move right cell to left of page

 3:40 pm on Jan 28, 2003 (gmt 0)

Simple product pages with header table contents table and footer table.

Currently page set at 760px wide for various reasons with fixed text at about 12px.

Contents table is issue for printing as it is wider than A4.

Contents table contains
- left cell containing a nav menu which is a table
- right cell with contents but

At the moment the left contents cell is fixed 132px wide as is the nav table inside it.

What I want is to use CSS to make the left cell and navigation dissapear on printing. I have followed various examples using divs that do this but want to apply this to a tables layout.

I can remove the fixed width of the left contents cell such that the menu table itself pushes the cell apart, if I can then get the menu table to dissapear on print then the left contents cell should compress to zero which is what I am after.

Any tips will be much appreciated.

Plus happy new year everyone, been away and not posted since last year.



 3:47 pm on Jan 28, 2003 (gmt 0)

display: none; [w3schools.com]


 4:05 pm on Jan 28, 2003 (gmt 0)

simple as that?

I suppose I better identify the table that I want to none otherwise the whole thing will be blank.

Thanks off to try options out.


 4:08 pm on Jan 28, 2003 (gmt 0)

If that doesn't do the trick for you, you can wrap the whole table in a div and set the display: none to the div, instead.


 4:09 pm on Jan 28, 2003 (gmt 0)

Tables and CSS can be unwilling partners on occasion. Please let us know how it turns out ;)



 4:18 pm on Jan 28, 2003 (gmt 0)

No worries I will come back to you on how it comes off.
I am sure I will be able to get it to work one way or another. Better had, hundreds of pages will be affected :-)

Anyhow first play with print media in css, about time perhaps.

Thanks for your help birdman.


 3:41 am on Jan 30, 2003 (gmt 0)

Just got onto this now.

IE5.5 Works a dream should sort most visitors.
Expect IE6 will be the same but dont have it on a machine at the moment.
Opera 6.05 looks fine - other issue print page footer awful.
NN4.7 fails miserably in (to be expected :-)
NN7 the css print media part works but there are other
"text dissapearing under images" problems which I don't like the look of.

After reading about in here I decided to include the print media statements in the one css file rather than link to two or import one extra. Seems cleaner to me.

However I would like to change the width of a footer table which only contains text from 760px on screen to 100% on print.. I guess I can work out how to do that myself now pretty easily.

Thanks to all for tips.

Looking forward to coming back soon.


 9:23 am on Jan 30, 2003 (gmt 0)

For static and important pages I've found it extremely useful to create a "stripped" page that has been manually optimized for printing.

That way I can assure that it will look ok no matter the browser ..


 9:43 am on Jan 30, 2003 (gmt 0)

Hi DrDoc,
That is probably a good idea when allowed but I am always wary of producing anything a search engine might think was duplicate spamming. Its one of the reasons I like the css media solution.

The pages I am working on are the product of a squirt from a client's system merged into various templates.

I know the limits of what can be in each field of the data but not exactly what it will be at the next update etc, e.g. word lengths, number of pages, number of levels, or sub records etc.

It is the reason why I have used fixed size fonts and table cells this time rather than a fully fluid layout which I used to prefer because some contents I do not want ever to scroll.


 9:47 am on Jan 30, 2003 (gmt 0)

BTW in case it was not clear..

The opera print page footer issue I think is because I am doing print preview on a laptop on which no printers are set up so It has no margin information to work to.

The NN7 "text dissapearing under images" I think is a new issue as I used to have this with nn4.7 as a result of bad coding, nn7 seems to be ignoring table cell widths or paragraph formatting from the css.

nn4.7 I did not expect to work and am not that bothered as it will almost certainly not be used by target site visitors.

Would like to test on a mac but none available.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved