Special Offers from Pantone.co.uk


Graphic Design | Website Design > UK Forums » Website Design Forums: » Website Coding & Programming Forum: » Background image in a table not appearing in browsers

Reply
Old 02-25-2009, 07:35 PM   #1
Senior Member
 
sweetums's Avatar
 
Join Date: Jun 2008
Location: Bristol (UK)
Posts: 107
Thanks: 15
Thanked 8 Times in 6 Posts
Send a message via MSN to sweetums Send a message via Skype™ to sweetums
Default Background image in a table not appearing in browsers

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
sweetums is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 02-25-2009, 11:23 PM   #2
Member
 
Join Date: Feb 2009
Location: Cambridge
Posts: 64
Thanks: 1
Thanked 13 Times in 12 Posts
Send a message via Skype™ to salvador
Default

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
salvador is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
The Following User Says Thank You to salvador For This Useful Post:
sweetums (03-05-2009)
Old 02-27-2009, 03:41 PM   #3
Junior Member
 
conanite's Avatar
 
Join Date: Feb 2009
Posts: 20
Thanks: 2
Thanked 2 Times in 2 Posts
Default

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?
conanite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
The Following User Says Thank You to conanite For This Useful Post:
sweetums (03-05-2009)
Old 02-27-2009, 06:20 PM   #4
Senior Member
 
sweetums's Avatar
 
Join Date: Jun 2008
Location: Bristol (UK)
Posts: 107
Thanks: 15
Thanked 8 Times in 6 Posts
Send a message via MSN to sweetums Send a message via Skype™ to sweetums
Default

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
sweetums is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 03-08-2009, 11:40 AM   #5
Senior Member
 
Join Date: Mar 2009
Location: Hampshire
Posts: 187
Thanks: 4
Thanked 13 Times in 13 Posts
Default

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
__________________
Cheers

Kev

-
Web Design - Web Development Hampshire - Web Developer
KevJaques is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Flyer Printing | Print Reseller Scheme | Logo Design | Graphic Design | Logo Designer | Web Design UK | Graphic Design UK | Letterhead Printing
Business Card Printing | UK Business Forum | Flyer Printing | Logo Designer | NCR Pads | NCR Books | Drinks Coasters | Logo Design
A6 Flyers | A5 Leaflets | Web Design & Development | vBulletin Skins


DISCLAIMER: All posts on this forum express the views and opinions of the author only, not the owners, staff or advertisers, hence we will not be held liable.


Powered by vBulletin®
© Copyright Jelsoft Enterprises Ltd
SEO by vBSEO 3.2.0 RC5 ©2008, Crawlability, Inc.