52 users online (0 members and 52 guests)  

Thread: Table Question


  Results 1 to 12 of 12

Related

  1. Table Question    Forum: HTML Forum
    Replies: 7
  2. Yet another Table Question    Forum: HTML Forum
    Replies: 2
  3. table question    Forum: HTML Forum
    Replies: 6
  4. Table question    Forum: HTML Forum
    Replies: 1
  5. Help with a stupid table question    Forum: HTML Forum
    Replies: 2
  1. #1
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83

    Question Table Question

    ---Hello~~~

    Is there a way to make the background of a table be a picture?

    ---Josh~~~~

  2. #2
    krak_d's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Liverpool
    Posts
    166
    Hi Josh,

    try this:

    <html>
    <head>
    <title>Table Background Image</title>
    <style>
    <!--
    .table1 {background-image: url(yourImage.jpg)}
    //-->
    </style>
    </head>

    <body>
    <table class=table1>
    <tr><td>text text text text text text</td></tr>
    </table>
    </body>
    </html>

    Hope this helps.

    krak_d

  3. #3
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    thanx for the reply krak d. I tried the code that you gave me but it didnt work. i dont know what went wrong though. ???

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    can you post a link or your code

    Dave

  5. #5
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---This Is The Code That I Used :

    <html>
    <head>
    <title>Table Background Image</title>
    <style>
    <!--
    .table1 {background-image: url(yourImage.jpg)}
    //-->
    </style>
    </head>

    <body>
    <table class=table1>
    <tr><td>text text text text text text</td></tr>
    </table>
    </body>
    </html>

    ---My Website Is http://geocities.com/thewrestlinghideout But There's No Table On It Cause I Couldn't Get The Code To Work.

    ---PS : My Website Is Under Construction Thats Why There's Nothing On It Except A Navigation System

  6. #6
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    according to the code you posted you will have to have an image actually named yourImage.jpg and it must be in the same directory as the page calling the image.

    Dave

  7. #7
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    i replaced "yourImage.jpg" with the name of my image and it still didnt work

  8. #8
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    make a test page so I can see exactly what you have

    btw, this is why I said to post your code, I had already seen the sample code posted by krak d

    Dave

  9. #9
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    Thanx For the Help But I Messed Around With It And I Got It To Work I Don't Know What It Was But Now It Works

    ---Josh
    Last edited by DaWebmasta; 08-01-2004 at 10:32 PM.

  10. #10
    deadfinger04's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Aug 2004
    Posts
    39
    well idk bout u guys but i usually just do this

    <table background="url of image" width="100" height="100"><tr><td></td></table>
    or u can add background to each individual umm cell.

  11. #11
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    My explanation.....

    Quote Originally Posted by undertaker
    Thanx For the Help But I Messed Around With It And I Got It To Work I Don't Know What It Was But Now It Works

    ---Josh
    It works because you've given the table 'dimension' (width and height). You would have had it work by including content inside the table as well.
    As it was, you just told the browser what to show as a background if there was anything in it.
    Cheers

  12. #12
    deadfinger04's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Aug 2004
    Posts
    39
    yup agreed if u dont have anything inside the tables they "sqrunch" up and stay that way unless they are filled.



Tags for this Thread