• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

HTML question

johnjbruin

Diamond Member
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.
 
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.
 
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
 
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.
 
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.
 
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
 
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.
 
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.
 
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.
 
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.
 
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.
 
Back
Top