![]() |
|
|
#1 | ||
|
Senior Member
|
I'm making a web page that is table based and I am having trouble with a background image in the table.
I've tried adding the background to a table using CSS. I've given the table an ID, and created a style rule to apply the appropriate CSS background properties. Here is the bit of code that I'm using: #mytable_id { background-image: url(/assets/images/my_background.png); background-repeat: no-repeat; } This makes the image appear in the Dreamweaver screen but when I click to Preview it in a browser window it is not visible. I've tried it in Safari and Firefox and both have the same results. Any ideas where I'm going wrong?
__________________
liamjaydesigns.com Design Blog Find me on Twitter Two fonts walk into a bar, the bartender says, "we don't serve your type here." So they called the serif |
||
|
|
|
|
|
#2 | ||
|
Member
|
If you can provide me with a copy of your file(s), it will help me rectify the issue for you quick.
~Peace~
__________________
Cambridge web design |
||
|
|
|
| The Following User Says Thank You to salvador For This Useful Post: | sweetums (03-05-2009) |
|
|
#3 | ||
|
Junior Member
Join Date: Feb 2009
Posts: 20
Thanks: 2
Thanked 2 Times in 2 Posts
|
I put the url of the image in single-quotes. I don't know if this is required by the specification, but I haven't had problems either.
background-image: url('/assets/images/my_background.png'); the other thing that might be going wrong is the availability of the file - is it in the right place relative to the parent file so that the browser will find it? When dreamweaver sets up a preview, does it ensure related resources are properly in place? |
||
|
|
|
| The Following User Says Thank You to conanite For This Useful Post: | sweetums (03-05-2009) |
|
|
#4 | ||
|
Senior Member
|
Salvador, thanks for the offer and I was gonna take you up on it but luckily Conanite's suggestion worked.
Thanks to both of you for helping out.
__________________
liamjaydesigns.com Design Blog Find me on Twitter Two fonts walk into a bar, the bartender says, "we don't serve your type here." So they called the serif |
||
|
|
|
|
|
#5 | ||
|
Senior Member
Join Date: Mar 2009
Location: Hampshire
Posts: 187
Thanks: 4
Thanked 13 Times in 13 Posts
|
Try to avoid using tables, you can easily use lists for tabular data and it's so worth the effort.
you can also shorten the css by doing this background: url(/assets/images/my_background.png) no-repeat; you can also put in a colour before the img too, handy if you want to use transparent graphics |
||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|