ned.adams Posted January 29, 2007 Share Posted January 29, 2007 Hello, I have a site that has tables in it. When I print to a printer the tables look very bad. I am trying to setup an alternate style sheet that will strip the bad looking tables out and print only the content. Does anyone have a good tutorial that works in both IE7 and Firefox, or suggestions on how to do this?Thanks in advance! Link to comment Share on other sites More sharing options...
dalewb Posted January 29, 2007 Share Posted January 29, 2007 Hello, I have a site that has tables in it. When I print to a printer the tables look very bad. I am trying to setup an alternate style sheet that will strip the bad looking tables out and print only the content. Does anyone have a good tutorial that works in both IE7 and Firefox, or suggestions on how to do this?Thanks in advance!I've tested this and it works:<link rel="stylesheet" type="text/css" href="css/main.css" media="screen, projection"/> <!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen, projection" href="tyle_IE.css" /><![endif]--> <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen, projection" href="css/ie7.css" /><![endif]--></head><body> You'll then put any changes to the css code in those alternate css files, while the bulk of your code will go in your main css file. Also notice in my code that I've placed my css files in a special folder - so change the uri if your directory structure is different. Link to comment Share on other sites More sharing options...
ned.adams Posted January 29, 2007 Author Share Posted January 29, 2007 What do those css files look like? I've tested this and it works:<link rel="stylesheet" type="text/css" href="css/main.css" media="screen, projection"/> <!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen, projection" href="tyle_IE.css" /><![endif]--> <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen, projection" href="css/ie7.css" /><![endif]--></head><body> You'll then put any changes to the css code in those alternate css files, while the bulk of your code will go in your main css file. Also notice in my code that I've placed my css files in a special folder - so change the uri if your directory structure is different. Link to comment Share on other sites More sharing options...
ned.adams Posted January 29, 2007 Author Share Posted January 29, 2007 Also what is this syntax? I haven't seen it before and when I use it in my file it comments out what is between it. "<!--[if IE 7]> <![endif]-->" What do those css files look like? Link to comment Share on other sites More sharing options...
ned.adams Posted January 29, 2007 Author Share Posted January 29, 2007 Nevermind, I worked through it and finally got it! THANK YOU SOOO MUCH! Also what is this syntax? I haven't seen it before and when I use it in my file it comments out what is between it. "<!--[if IE 7]> <![endif]-->" Link to comment Share on other sites More sharing options...
ned.adams Posted January 29, 2007 Author Share Posted January 29, 2007 So I jumped the gun a little bit. Now it doesn't work in FireFox. Is there a thing like <!--[if IE 7]><endif]--> for firefox? Nevermind, I worked through it and finally got it! THANK YOU SOOO MUCH! Link to comment Share on other sites More sharing options...
ned.adams Posted January 29, 2007 Author Share Posted January 29, 2007 For anyone who looks at this, that syntax is only for IE. So I just copied the print css without that condition and it worked for FireFox. Thanks for your help again! So I jumped the gun a little bit. Now it doesn't work in FireFox. Is there a thing like <!--[if IE 7]><endif]--> for firefox? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now