75 users online (1 members and 74 guests)  

Thread: CSS background


  Results 1 to 4 of 4

Related

  1. Background help    Forum: HTML Forum
    Replies: 6
  2. Background colors. How?    Forum: HTML Forum
    Replies: 2
  3. Background Image    Forum: HTML Forum
    Replies: 4
  4. background mp3    Forum: HTML Forum
    Replies: 1
  5. background help    Forum: HTML Forum
    Replies: 1
  1. #1
    htmldummie's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    6

    CSS background

    Hiya,

    I have my own website but I'm still learning HTML. I figured out how to put my webpages background in CSS.

    But I would like to set a background to my tables. Meaning that I would like each webpage to have the same background pictures in the table. But I can't seem to make that work. Can anyone give me the code for this?

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there htmldummie,

    and a warm welcome to these forums

    Here is a working example that should help you on your way...
    Code:
    <html>
    <head>
    <title>td background images</title>
    
    <style type="text/css">
    <!--
    body {
         background:#000080;
     }
    table {
         border:solid 1px #000000;
         background:#ffffff;
     }
    td {
         width:100px;
         height:100px;
         border:solid 1px #000000;
         font-family:arial;
         font-size:18px;
         color:#ffffff;
         text-align:center;
     }
    #cell1 {
         background:url(http://hstrial-dbayly.homestead.com/files/anim.gif);
     }
    #cell2 {
         background:url(http://hstrial-dbayly.homestead.com/files/anim2.gif);
     }
    #container {
         position:absolute;
         top:200px;
         left:300px;
    }
    //-->
    </style>
    
    </head>
    <body>
    
    <div id="container">
    <table><tr>
    <td id="cell1">This is cell1</td>
    <td id="cell2">This is cell2</td>
    </tr></table>
    </div>
    
    </body>
    </html>
    
         
    coothead

  3. #3
    htmldummie's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    6

    thanks

    Hey thanks,
    But I honestly don't know squad about HTML. Don't even know how to adjust that code to make it fit my website.
    Sorry, but I'm very new at this.

    The thing is, I have an existing CSS sheet. And all I want to do is add something to that, to display the background in my table.

  4. #4
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there htmldummie,

    '...don't know squad about HTML. Don't even know how to adjust that code to make it fit my website.
    Sorry, but I'm very new at this....'
    In that case it seems that you should learn how to walk beforre attempting to run

    Check out...w3schools...you will be running in next to no time


    coothead



Tags for this Thread