472,958 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Printing floating-image thumbnail CSS pages

Hi. I've just recently switched to using CSS (rather than tables) to
display collections of thumbnails. That way, depending on the user's
screen resolution and browser window size, the number of "columns" on
the window is variable. Some examples of pages I've created this way
are:

http://www.engr.uconn.edu/~spm01f01/suspension/

http://www.engr.uconn.edu/~spm01f01/tutorial/

A shortened version of the HTML might look like what I pasted at the
bottom of this page (note that I kept the CSS stuff embedded in the one
HTML file since it's so short).

My problem is that when I try to print out pages I've made this way,
they don't come out well at all. In IE6, I get a blank page, one page
with the images, and then a third page which is mostly blank. On the
page with the images, some of them are extending off the screen. In
Opera (7 and 8.5), the pages print out basically as I see them on the
screen, but images get chopped between pages.

I'm probably grossly overlooking some aspect of how to write CSS, as
I'm still a newb as far as CSS goes. I basically just picked apart some
code I found on the web until I got my pages to look how I wanted. I
intend to learn CSS thoroughly when I get some time, but for now I just
want to patch up this one bit of code. Hopefully someone can point out
my mistake. BTW, I've heard of the ability to write seperate code for
"print media", but I'd rather not have to do that if I don't need to.

Thanks!

sean
<html>
<head>
<title>Tutorial folder</title>
<STYLE TYPE ="text/css">
<!--
div.float {
float: left;
width: 365px;
height: 275 px;
padding: 0px;
}

div.float p {
text-align: center;
}

div.container {
background-color: #fff;
}

div.spacer {
clear: both;
}

-->
</STYLE>
</head>

<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
<basefont face="Arial, Helvetica, Sans Serif">

<h1>Tutorial folder</h1>

<div class="container">
<div class="spacer">&nbsp;</div>

<div class="float"><img src="thumbs/tn_001.jpg" border="0" alt="001.jpg
(2048x1536; 1492057 bytes)"></a></div>
<div class="float"><img src="thumbs/tn_002.jpg" border="0" alt="002.jpg
(1536x2048; 262812 bytes)"></a></div>
<div class="spacer">&nbsp;</div>
</div>

</body>
</html>

Mar 1 '06 #1
5 2545
I should note that the problem with printing in IE isn't that I get a
blank page before and after the pictures. It's that there is only one
page in between them, no matter how many images I have. So I only get a
small percentage of my images showing up on the printout. This is true
for ANY page I make in this manner - when I print, there's only one
page showing the "meat" of the page. Anything that doesn't fit in that
one page doesn't show up anywhere.

As much as I'd like to blame it on IE, other browsers all show some
types of problems with my pages, so I think it's my fault - something
I'm doing wrong with CSS methods.

Mar 2 '06 #2
Els
sp********@yahoo.com wrote:
I should note that the problem with printing in IE isn't that I get a
blank page before and after the pictures. It's that there is only one
page in between them, no matter how many images I have. So I only get a
small percentage of my images showing up on the printout. This is true
for ANY page I make in this manner - when I print, there's only one
page showing the "meat" of the page. Anything that doesn't fit in that
one page doesn't show up anywhere.


It sounds like you have your printer settings in IE set to print only
'1' page instead of 'All'.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Dirty White Boy - Hammer On The Heart
Mar 2 '06 #3
Nope, nothing like that. I get weird behavior in other browsers too.

Els wrote:

It sounds like you have your printer settings in IE set to print only
'1' page instead of 'All'.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Dirty White Boy - Hammer On The Heart


Mar 3 '06 #4
Els
sp********@yahoo.com wrote:
Els wrote:

It sounds like you have your printer settings in IE set to print only
'1' page instead of 'All'.


Nope, nothing like that. I get weird behavior in other browsers too.


Do you get the same result in the print preview, or only when
printing? I'm not gonna try and print your pages, (too much ink and my
colours ran out already), but in the print preview it looks okay here.
Have you tried what happens if you would do exactly the same HTML and
CSS, but have the images resized in an image editor first, so they
aren't resized by the code?
If the print preview looks good and the prints are bad: have you reset
your printer? Are there any settings on the printer itself wrt
margins, paper size, etc.?

(that's about all the ideas I can come up with...)

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Mar 3 '06 #5
Yes I get the same result in print preview. What browser are you using?
I've tried quite a few and always got bad results. I'll try the
resizing idea.

It's almost like how in Word, if you place floating images, you can't
place them on their own page unless something else (text, blank space)
exists to "reserve/allocate" that page. Not true with inline images,
just floating ones. I was thinking that maybe the use of floating DIV's
might be causing a similar effect, but I don't know enough about it to
be sure.

thanks

sean

Els wrote:

Do you get the same result in the print preview, or only when
printing? I'm not gonna try and print your pages, (too much ink and my
colours ran out already), but in the print preview it looks okay here.
Have you tried what happens if you would do exactly the same HTML and
CSS, but have the images resized in an image editor first, so they
aren't resized by the code?
If the print preview looks good and the prints are bad: have you reset
your printer? Are there any settings on the printer itself wrt
margins, paper size, etc.?

(that's about all the ideas I can come up with...)

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/


Mar 3 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Hudson | last post by:
Does anyone (Tim?) have (ideally Python, but I can cope) code implementing the fixed-format algorithm from the Subject: named paper by Burger & Dybvig? Cheers, mwh -- <Erwin> #python FAQ:...
31
by: JS | last post by:
We have the same floating point intensive C++ program that runs on Windows on Intel chip and on Sun Solaris on SPARC chips. The program reads the exactly the same input files on the two platforms....
687
by: cody | last post by:
no this is no trollposting and please don't get it wrong but iam very curious why people still use C instead of other languages especially C++. i heard people say C++ is slower than C but i can't...
10
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...
7
by: Vinoth | last post by:
I'm working in an ARM (ARM9) system which does not have Floating point co-processor or Floating point libraries. But it does support long long int (64 bits). Can you provide some link that would...
15
by: michael.mcgarry | last post by:
Hi, I have a question about floating point precision in C. What is the minimum distinguishable difference between 2 floating point numbers? Does this differ for various computers? Is this...
32
by: ma740988 | last post by:
template <class T> inline bool isEqual( const T& a, const T& b, const T epsilon = std::numeric_limits<T>::epsilon() ) { const T diff = a - b; return ( diff <= epsilon ) && ( diff >= -epsilon );...
39
by: rembremading | last post by:
Hi all! The following piece of code has (for me) completely unexpected behaviour. (I compile it with gcc-Version 4.0.3) Something goes wrong with the integer to float conversion. Maybe somebody...
2
by: utab | last post by:
Dear all, On a formatted printing operation that I am trying to accomplish for doubles, I have a question. I would like to print a double, d, and its square, d*d, but I would like to make the...
7
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.