Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2006
    Location
    Vienna, VA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to place a background image in <TD> cell?

    I've tried everything I can think of to get this background image to show up within a <TD> tag. Can you guys see any reason why its not showing up?

    Code:
    <td width="918" height="319" style="background-image: url ('images/bodybkgrnd-2.gif'); background-repeat: no-repeat; background-position: center;">
    Heres the link to the page live:

    www.phoenixmason.com/newsite/patio.php

    Thanks

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this, I only used the full url for testing so you can take that out. Seems to work though...

    style="background: url(http://www.phoenixmason.com/newsite/images/bodybkgrnd-2.gif) no-repeat center"

  • #3
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,700
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there mattyboi,

    the cause of the problem is the whitespace between url and the '('. Close that up and it should be OK.

    coothead

  • #4
    New Coder
    Join Date
    Mar 2006
    Location
    Vienna, VA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank, you guys are great! It was driving me crazy

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quotes

    Also, it's recommended not to quote the URL itself; if I recall correctly, some browsers (IE?) have problems with this.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •