Question by queenbee: HTML/CSS: why will my picture not change height?? please help?
im trying to get a picture to go the full height of my table, just like the one running along the sides of this table:http://www.earthfacts.net/climate/ , i have tried everything but nothing seems to work, at the minuet i have this in my HTML:
and this in my CSS: #bg { background: url(background.jpg) no-repeat; width:73% ; height:200% ; display: block; align=”center” }
this only changes the width and height of the table and makes no changes to the picture, please help because it is driving me crazy…
never mind the %s i have that was just me messing but it only changes the table size
it doesnt matter if i use pixles or % it still just changes the table size and not the picture
Best answer:
Answer by HairGawd
If you picture is a static size which I’m sure it is, just try using exact pixel measurements rather than percentages. You should have a problem using exact pixels. Percentages can be wonky at times, depends on the rest of your code.
Add your own answer in the comments!
when you declare width and height in css, you declare it for the table, not for the background-image.
I suggest put this between your
tags

and the css should look like this:
#bg { width:73% ; height:200% ; display: block; align=”center” }
that should do it
Change your CSS:
table {background: urlbackground.jpg); width:xxpx; height:yypx; }
where xx equals the width of your background image in pixels and yy equals the height. You could use the number of pixels larger than the actual size, but the image will not look good.
However, this will confine your table to the size of your background image. Not knowing the size of the bg or what you really want it to look like I can’t say if that is good or bad.