473,805 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS Floats Breaking When Printing

19 New Member
Hi Everyone,

I have a tableless website design and I am trying to add the feature to print the middle column content on one of my pages. The information that is being displayed is a two column layout with a float left and a float right. When I view the page in Print Preview, the float right column breaks to the next line.

I haven't been able to come up with a viable solution for this problem. I've tried creating my own stylesheet for printing and was able to format everything but this issue. I was able to remove the main left and right columns of the page as well as format the header and footer. I've tried removing the floats in the stylesheet, just changing them to float left, setting display equal to table, etc... but nothing seems to work for the information being displayed in the main middle column.

Any help you can provide would be greatly appreciated.

Thanks.
Sep 10 '08 #1
1 6798
spoonybard
19 New Member
I found a solution that works for me. I did the following:
  • Had the div that floats right to float left
  • Had the div that floats left to clear left and have a page-break-before: always
  • Had the div that floats right to page-break-after: always
  • Added the width for the float left and float right

This is only needed in IE because IE ignores the width's you set in a div and puts in width: 100%.

Hope this helps anyone else looking for an answer on this issue.
Sep 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1578
by: Thomas Miskiewicz | last post by:
Hi! I'm using the page-break-before:auto thing with my IE 6.0.2600.0000 and it works fine. However when I go into printing preview and printing it's showing adding a empty row by the end of every page. Do you guys know how to get rid of that? thanks Tom
43
2220
by: J.K. Becker | last post by:
Hi there, I am trying to multiply doubles with floats (actually I tried every possible combination by now) and it never works (well, it does something but it is always wrong). I have no idea what it is and where to look for help, maybe some of you know? double=float*double; (or every possible combination of it). An example: 0.3 * 0.7 would result in 1.7 (with lots more digits). Anyone any idea?
4
1821
by: Adam Warner | last post by:
Hi all, I'm used to ANSI Common Lisp implementations sanely printing single and double floats. By sane I mean the printed decimal representation mimics the underlying binary precision of the float. For example: > (coerce 2/3 'single-float) 0.6666667 > (coerce 2/300 'single-float) 0.006666667
10
2880
by: ben | last post by:
i'm learning about the floating point format that's used on my computer (apple mac so powerpc) i've written a function to print out the bits in a float to see how floats are represented and i also have a software programmer's calculator called BinCalc which shows the bits of whatever number. the bits that my code and the bits that the calculator show, for the same value, don't match. for example for the number 1.0 my code says:...
44
2689
by: Kosio | last post by:
-Hello, I'm looking for a way to deconstruct a (32 bit) float value to four (8 bit) char values. I then need a way to take those four (8 bit) char values and construct a (32 bit) float value. The reason I ask is that I am sending things across an rs485 serial network, and the protocol is set up to send byte by byte. It sends one (8 bit) char at a time. I would like to send a float across this network in the form of four chars...
9
1554
by: joanne matthews (RRes-Roth) | last post by:
I'm getting different results when I add up a list of floats depending on the order that I list the floats. For example, the following returns False: def check(): totalProp=0 inputs= for each in inputs: totalProp+=each print "totalProp=",totalProp
16
4139
by: luca bertini | last post by:
Hi, i have strings which look like money values (ie 34.45) is there a way to convert them into float variables? everytime i try I get this error: "numb = float(my_line) ValueError: empty string for float()" " here's the code ************
21
4330
by: array7 | last post by:
I have been reading a lot of archived threads about "page-break- inside: avoid" not supported by IE5, IE6 IE55, IE7 and Firefox (Mozilla), which creates a really unpleasant-looking printout with broken table rows. I wonder if after all these years in discussion anyone had come up with a trick using maybe some combination of "page-break-before", "page-break-after" or div properties that would prevent the situation.
7
2385
by: Ouroborus777 | last post by:
I've been messing around with printing floats. It seems that printf() is only capable of printing the fractional portion at a fixed length. Is there some way to print floats such that the full fraction is shown but without the trailing zeroes? I realize that this could be an exercise in string manipulation (ie: stringify the float giving a length that's longer than the float could possibly be then trim the trailing zeroes) but I would...
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9185
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5542
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.