SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Background Table (Cell) Image

    Hey-lo

    Well, I'm building my first website and I've created a pretty table. Go me. Well, I have the images in separate cells as IMG SRC="yaddayaddayada", so it's an image in the cell. But, what I want to do it set it as the background in that cell so that I can write/put images OVER it.

    Wow, does anybody have a clue as to what I'm babbling about? I'd appreciate any help! Thanks

    -- Lulabyte

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <td style="background-image: url("../images/bgdesert.jpg")

    For more info on background properties try

    http://www.w3schools.com/css/css_background.asp
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Hrm . . .

    Hrm . . .

    Well, here's what the tag looks like:

    <TD ALIGN="left" STYLE="C:\Documents and Settings\Lulabyte\My Documents\Lulabyte.net\Pictures\lulabyte.net - left side.jpg"></TD>

    It didn't work, though. Any suggestions? I have about 4 cells, each with their own image that I want to be a background. Will the code work this? Do I have to put a special CSS coding into it? Are there any HTML tags for this? Also, this code is for tables, right?

    Whew.

    -- Lulabyte

  4. #4
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Ah Ha!

    I got it! Thanks a lot!

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ideally, the path to the image would be relative. That means that you only include the directors neede to get TO the image from where the PAGE is.

    In the example you gave above, you could do this:
    <TD ALIGN="left" STYLE="Pictures\lulabyte.net - left side.jpg"></TD>

    That is if the directory "Pictures" and the page that image is on exist in the same directory "lulabyte.net".

    A word of warning. I would NOT put spaces OR periods into your image names. This can cause problems with some browsers. If you desire a visual space between words in your image names then use the "_" characters (called an underscore). Periods are interpreted as the delineation between file name and file extension. The image name above would then look like this:

    lulabyte_net_left_side.jpg

    You could also save yourself some typing by removing the "lulabyte.net" completely from your file name. Since you've your images in a seperate folder "picture" inside the "lulabyte.net" folder, it's safe to assume that any images inside "lulabyte.net/pictures" belong to the lulabyte.net website. You follow?

    One last thing, this is more a word of caution, I personally would avoid upper or mixed case file names. When you mix case like "Pictures" this means that the path to the image would HAVE to be "/Pictures/black.jpg" for the link to work. "/pictures/black.jpg" would not work as the p is lower case. It's a matter of preference though. Just make sure that you're consistent. If you mix case then ALWAYS mix case.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

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