Forum Moderators: not2easy

Message Too Old, No Replies

Printing Floats in IE

How do you print floating layouts with CSS?

         

Barbacena

2:41 pm on May 9, 2006 (gmt 0)

10+ Year Member



There seems to be a serious problem with printing floats in IE. It creates huge gaps between floats and non-floats, makes elements jump to a different page or have them disappear all together. Yes, I know that IE doesn't like floats and one way of getting your pages to display everything is to set all elements to float to none, however, this destroys the layout. So for example where you have a 4 column layout with each column floating to the left, it means that these will all print under each other once you set everything to float:none in your print stylesheet.

This is not a solution and I was wondering how I could get columns to display right without using tables, once the page has been printed?

4css

2:53 pm on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You would put float: none; I believe for the floated areas of your print page.

You might have to make a few adjustments in your divs etc.. I"m going to sticky you a few links that are pretty good. I did a print style a while back for someone.

hope this helps!

Barbacena

9:22 am on May 10, 2006 (gmt 0)

10+ Year Member



Thank you for your links, unfortunately I am still trying to find a way to stop IE breaking column layouts as it will either corrupt the floats by inserting massive chunks of white space before them or will print them in linear fashion if you switch float styles...There seems to be a no win situation and there is way to much fiddling to be done in the print.css to get the layout right for it to be worthwile. :-(

4css

11:54 am on May 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you sticky the file to me?

Yes, it is a bit of a pain to do this, I had a source ordered page that I had to turn into a print page, so it wasn't easy to do.

But, the page did work out even with it being a print page with source ordering. So maybe I can give you a hand with it? I would be willing to take a look at it to see if I can help you with it.

I'm not familiar with page breaks etc.. I had printed out a bunch of stuff, but am missing the first few pages? lol, that is what happens when you keep an unorganized pc desk ;) And since I had copied into word to print it, I am not sure where I had gotten the information from. :(

Just let me know, I'll be in and out on and off today. So I'll try to do what I can to help you out with it. You can sticky the link to me, which might be easier then the code.

4~css
ps, just don't give up, I am sure there is a solution to this.

doodlebee

3:24 pm on May 10, 2006 (gmt 0)

10+ Year Member



Ditto - you can sticky me the link as well - between all of us we should be able to come up with something.