Print style sheet still showing nav bar and sub nav links

Permalink
I am wanting to establish a print stylesheet that purely shows the body copy of the website and none of the navigation links but despite putting this in the header

<link rel="stylesheet" href="/themes/default/print.css" type="text/css" media="print" />


I have made sure that the #navigation div is set to display=none however it is still showing all the nav links. Is there a way of ensuring that the navigation doesn't show. Should I edit the nav block? Or change something else...

chassa2556
View Replies:
chassa2556 replied on at Permalink Reply
chassa2556
any ideas on this anyone?
Remo replied on at Permalink Reply
Remo
I can't see why this should be related to Concrete5, this looks like standard html stuff..

I also can't see what could possible go wrong with the little information you've included in your post.

Do you have a site where we could actually see what happens? It's a lot easier to help you if we can reproduce the problem!
chassa2556 replied on at Permalink Reply
chassa2556
Hi - this is the code I'm using for my print style sheets. I've set the media to 'print' and its doing a fine job on the body copy etc however the navigation still shows as a long unordered list. Should I set something within the auto-nav block as well. Its showing both the main nav and sub nav lists which should be not showing....any ideas?


#leftCol, #rightCol,#navigation,#nav,#mainPic,#newsMainBox, .nav-header, #navigation ul .nav-header, #navigation ul .nav-header,#navigation ul .nav-sidebar  {
   display: none;
}
#newMainBox {
   display: none !important;
   }
#navigation {
   display: none !important;
   }
   #navigation * {
   display: none !important;
   }
   .nav * {
   display: none !important;
   }
Remo replied on at Permalink Reply
Remo
got a link to your site?

or try to switch the media from print to screen and use firebug to check which styles are used. This allows you to find the problem very quickly..
Remo replied on at Permalink Reply 1 Attachment
Remo
Firebug's your best friend!

The CSS includes are a bit messy. I can only assume what you did.


1. It looks like you tried to modify the default theme. Never ever modify anything in the concrete directory, it's what you override when you update to a new version

2. Copy /concrete/themes/default to /themes/yourThemeName (or follow this tutorial:http://www.codeblog.ch/2009/01/concrete5-theme-erstellen)...

3. Be careful when you create a site in a sub directory, especially when you hard code your paths. The php constant DIR_REL can be quite helpful!

4. Use the proper css method to include your css files, this also allows you to use customizable styles in your css file which you can later modfiy in the UI. see page 4, or directly:
http://www.codeblog.ch/2009/01/concrete5-theme-erstellen/4/...

Why do I know this? Opening Firebug told me rather quickly that things aren't working as
your files does not even get included! See attachment..

(He sent me a link for those who wonder why I know this)
chassa2556 replied on at Permalink Reply
chassa2556
Hey thanks Remo for the tips - I've got it working now it was some spurious CSS style sheet id #ccm-main-nav. Firebug found it for me what a useful facility to bug fix with C5. I didn't even know that there was a style called this it must have come from deep in the C5 architecture...
cimdev replied on at Permalink Reply 2 Attachments
What exactly did you do to fix ? I have similar problem.. I am not adding a "Print Friendly" button, just want the Nav bar to print as laid out on screen (horizontally), instead of ordered list vertically.. See attachments..

I am using Zenlike theme and modifying the main.css and typography.css files..
I have same issue using Default theme on another site.

I tried using Firebug as Remo suggested but not exactly knowing what I need to modify..

Any help would be appreciated !
Site is located athttp://www.wiegandswholesale.com...
chassa2556 replied on at Permalink Reply 1 Attachment
chassa2556
Here is a copy of the style sheet I used. I went for hiding the nav bar as I didn't really want to see the nav on the print style sheet if you do want it showing horizontal I guess you would need to put the command "display:inline;" in navigation bar css to keep it showing correctly.
cimdev replied on at Permalink Reply
Hey, your print.css helped a great deal ! I simply copied my themes "main.css" to a "print.css" and used the "display:none" for all the nav bar elements and it is now at least printing with a reasonable approximation of what I see on the screen...

I can at least start building the layout back up with the "display:inline" to get the nav bar printing as I see it on the screen...

Thanks !
chassa2556 replied on at Permalink Reply
chassa2556
Glad it helped - greetings from frozen UK...