HTML question

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
I have to generate a histogram using html only. The problem is that i cant use images.
I was able to make one with just using tables and using a black background <td> for the bars. It shows up perfectly when looking at it on the screen. The problem is that when i print it - it doesnt print since backgrounds are not printed by default in HTML.

Do any of you guys know of any other tricks with html only - no images - by which i could actually print the bars for the histograms?

Note: I cant generate a text based histogram.

I hope i'm not SOL on this problem.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: cr4zymofo
printer settings.

Its ok for me - but this is a dynamic page for a client - and it has to print by default without changing any settings.
 

So

Lifer
Jul 2, 2001
25,923
17
81
out of curiousity, why no images?

Maybe you can use CSS.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: So
out of curiousity, why no images?

Maybe you can use CSS.

An application will be creating a temp file and opening it in the default browser - so the user just prints it and closes the browser and doesnt have to worry about it anymore.
 

Ornery

Lifer
Oct 9, 1999
20,022
17
81
Instead of a black background, how about a small black tile image as a background in the cell?
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
CSS should work fine, right? Create several divs floated left next to each other with heights according to the design requirements.

Why don't tables work? I thought table BG colors were printed...

Rob
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Entity
CSS should work fine, right? Create several divs floated left next to each other with heights according to the design requirements.

Rob

Do you have an example of this. I am not that familiar with CSS - only know the very basic stuff. Thanks.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Entity
CSS should work fine, right? Create several divs floated left next to each other with heights according to the design requirements.

Why don't tables work? I thought table BG colors were printed...

Rob

It displays fine on the screen - looking exactly as i want it - but the background colors arent printed.
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Originally posted by: johnjbruin
Originally posted by: Entity
CSS should work fine, right? Create several divs floated left next to each other with heights according to the design requirements.

Rob

Do you have an example of this. I am not that familiar with CSS - only know the very basic stuff. Thanks.

I'm trying to see if CSS prints or not right now.

Rob
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Ornery
Cell borders would be printed, but it would look blocky. Is that good enough?

yeah... i gave that a try too. It does look like bordered blocks.

Another thing i tried was using the <hr> tag with width. I can control the width - but i somehow would need to make it at least 10-12 pixels in height. I could not do that. since the <hr> tag only supports width.

Ps this is a histogram that has bars stretching left to right rather than up/down.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Hector13
sorry, why no images again?

An application will be creating a temp html file and opening it in the default browser. The requirements state that it should be "only html" from which I am assuming that I cant use images.

Edit: I realize that with images its a piece of cake.
 

Hector13

Golden Member
Apr 4, 2000
1,694
0
0
Originally posted by: johnjbruin
Originally posted by: Hector13
sorry, why no images again?

An application will be creating a temp html file and opening it in the default browser. The requirements state that it should be "only html" from which I am assuming that I cant use images.

Edit: I realize that with images its a piece of cake.

by image, I mean using a one-pixel imgage (or something similar) as mentioned above. The application will still just be creating a temp file and opening it in the default browser.

I don't think "only html" precludes using a pixel image that is approriately stretched.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Hector13
Originally posted by: johnjbruin
Originally posted by: Hector13
sorry, why no images again?

An application will be creating a temp html file and opening it in the default browser. The requirements state that it should be "only html" from which I am assuming that I cant use images.

Edit: I realize that with images its a piece of cake.

by image, I mean using a one-pixel imgage (or something similar) as mentioned above. The application will still just be creating a temp file and opening it in the default browser.

I don't think "only html" precludes using a pixel image that is approriately stretched.

I guess they only want one file to exist - so yeah... it is dumb - but thats waht they want.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
SWEET - I can just use the <button> tag and just put explicit spaces in there to generate the look - and it seems to print fine too.