Hi Christian,

Thanks for the help. I think I can do away with the containment div
around the bar graph img since I have another containment div already
performing some other functions. Any ideas on what is more correct:

<img src="bargraph.gif" height="<? some variable script here ?>" />

-OR-

<img src="bargraph.gif" style="height: <? some variable script here ?>" />

or in other words, does the image height declaration belong in the html or css?

If it does belong in the CSS, it would have to be in-line because I
don't think there is a way to write it dynamically into an outside
linked style sheet.

- BL

On 6/16/06, Christian Montoya <[EMAIL PROTECTED]> wrote:
> On 6/16/06, Ben Liu <[EMAIL PROTECTED]> wrote:
> > Hello All,
> >
> > I've developed a simple online bar graph for a client. The page
> > queries a database, tallies the total number of orders coming in from
> > each US state and then draws a series of bar graphs to represent the
> > number of orders. The report works fine expect when the user tries to
> > print it.
> ...
> > Anybody know a good light-weight way of solving this? I was
> > thinking of making the bars all divs with a fixed width and variable
> > height and then putting a large foreground img into them. But wouldn't
> > this cause the div to automatically expand to the full height and
> > width of the img?
>
> No, of course not... divs are not tables. By default, the img should
> overflow the div, and should be visible outside of the boundaries of
> the div. If you apply
>
> overflow:hidden;
>
> to the div, then only the parts of the img inside the div will show.
>
> > Perhaps I could variably set image height="x" within
> > the img tag?
>
> Why not just set the width and height of the image to be the same as
> the div in the CSS? Then again, since this is already a visual driven
> output, why not just use img's by themselves? You could do:
>
> img {
> display:block;
> width:Xpx;
> height:Xpx;
> ...
> }
>
> > Is their a CSS method to force background printing to
> > "on" for an item?
>
> No, and for good reason!
>
> HIH
>
> --
> --
> Christian Montoya
> christianmontoya.com ... portfolio.christianmontoya.com
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to