Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Background image not fully displayed

Status
Not open for further replies.

gwar2k1

Programmer
Apr 17, 2003
387
GB

Ive set the banner cell to 780 (the size of the image) but when viewed, theres only a bit of the image there.

So I added "px" (780px) and it has the same result.

Does any one know how to rectify this problem? Thanx

PS: A few things... < / h a c k > Is just a name, I do not actually hack. I will have tutorials of how to program in those languages NOT how to hack with them. I will also be adding animé content. Again, it's just a name. And the SSI error is because I havent made the page yet. BTW, Ive checked my code in FrontPage 2002 and it looks OK...

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Boy, talk about going about things the hard way...

Try changing this:
td.banner{width: 100%; height: 109; background-image: url(images/banner.png); vertical-align: bottom;}

to:
td.banner{width: 780px; height: 109; background-image: url(images/banner.png); vertical-align: bottom;}

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Doesnt work =(

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
think it's due to that fact that the table hasn't got a width therefore the background image is just showing want it can.

For example if you where to place int he image in the top cell using <img tag, it would fill all the way across for the size of the imaghe, but so would the lower cells.
Solution:
I would suggest that the background image being used needs to be seperate, and the class of a table or table cell that has the width it requires to be shown.

t_avatar.jpg

'... and then it wouldn't compile?'
 
Like I said, you are doing it the hard way. The current image is only as wide as the three cells below... Why not just put the image in the cell manually?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
table.main { width: 780;
td.banner { width: 780;

they both have widths defined?!
Ive tried them both with and without px

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
It's alittle confusing with those 2 <head> tags.
You seem to have half a page with half of another page at the bottom.
Code:
<html>
<head> (containing title/style/script tags)
</head>
<body>
Main content.
</body>
</html>
think to problem i occuring because there are 2 definations for table.main.

The top one states width: 780;
the later one width: 152;

The later one will over write any previously set attributes with it's own.

t_avatar.jpg

'... and then it wouldn't compile?'
 
-_- Why does it read the SSI page into the source of the main page? That's annoying

thanks...

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top