Background image in table



Hi there,

I have added an image to a table in html (using FP2002). When i preview the
page it shows the correct layout (I only want the image once, i.e. no repeat)
but when opening the page in ie it repeats the image across the table. Can
someone please assist me in correcting this.

Here is the table code I used:
<table width=480 cellspacing="0" cellpadding="4" border="0"
style="background-position:50% 4%" style="background-repeat:no-repeat">

Thanking you in advance!




Trevor Lawrence

Works for me.

My image is very small (60*40) and it does not repeat

<table width="480" cellspacing="0" cellpadding="4" border="0"
style="background:url('thought bubble.jpg') 50% 4% no-repeat">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
But I must explain to you how all this mistaken idea of denouncing pleasure
and praising pain was born and I will give you a complete account of the
system, and expound the actual teachings of the great explorer of the truth,
the master-builder of human happiness. No one rejects, dislikes, or avoids
pleasure itself, because it is pleasure, but because those who do not know
how to pursue pleasure rationally encounter consequences that are extremely
painful. Nor again is there anyone who loves or pursues or desires to obtain
pain of itself, because it is pain, but because occasionally circumstances
occur in which toil and pain can procure him some great pleasure. To take a
trivial example, which of us ever undertakes laborious physical exercise,
except to obtain some advantage from it? But who has any right to find fault
with a man who chooses to enjoy a pleasure that has no annoying
consequences, or one who avoids a pain that produces no resultant pleasure?



You have three style attributes in the table tag - normally only one is
Try this:
<table cellspacing="0" cellpadding="4" style="border: none; width: 480px;
background-image: url('images/PCS_DragonFly.jpg'); background-position: 50%
4%; background-repeat: no-repeat">
Ron Symonds
Microsoft MVP (Expression Web)

Reply only to group - emails will be deleted unread.


You have to make the table as big as the image or the image as big as the




No you don't.

if the image is larger than the table it will cut off on the right and/or bottom.
If the table is bigger than the image the image will tile to fill the space, UNLESS no-repeat is specified, as in this case.

Ron Symonds
Microsoft MVP (Expression Web)

Hot-text presented the following explanation :

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question