Results 1 to 5 of 5

Thread: css background image width

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    css background image width

    Hi,
    I am using CSS to set the background image of a certain cell in a table. What I want to know is if I can set the image's height or width to the a certain percentage of the cell? This is the code I'm using:

    <style = "text/css">
    <!--
    TABLE
    TR.text {color: #000000; font-size: 14pt}
    td.background {color: #000000}
    td.image { background-image: url('wm.jpg'); background-repeat: no-repeat;
    background-attachment: fixed; background-position: right center }
    TD.Padding {padding: 5; spacing: 5;}
    -->
    </style>

    I want to be able to say something like:
    td.image.width="100%"

    Please help me out. I'd appreciate it once again (for those of you who have read my previous posts).

  2. #2
    scoutt
    Guest
    could you do something like this
    Code:
    td.image { background-image: url('wm.jpg'); background-repeat: no-repeat; width: '100%';
    Scoutt

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    Hmm, why does that seem so obvious? Thanks a lot!

  4. #4
    scoutt
    Guest
    no problem, just let me know if it works
    Scoutt

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    It worked. Very well. Thanks.

Posting Permissions

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



Click Here to Expand Forum to Full Width