SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple CSS question

    I know this is simple, but I'm still learning my CSS by hand...

    I have a <td> tag, and I want to round the corners. So I created a image for the top of this cell. However, I can't get it to show...

    <td style="background-image: url(http://www.mysite.com/banners/roundcorners1.gif); background-repeat:
    no-repeat; background-position: top; background-color:#244B77;">

    I have problems with backgrounds in tables and cells all the time, actually. Is there something unique about them?

    PS: i also tried this as an external and an internal class, and it didn't work either.

  2. #2
    SitePoint Zealot planewalker's Avatar
    Join Date
    Jun 2007
    Location
    Somewhere witty
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. The image is uploaded I assume?

    2. Can you post a link to the file, or perhaps the code for the entire table?

    - For example, does the <td> have anything in it? If there is nothing, and you don't have an &nbsp;, then the td won't appear at all - unless you assign a height in the style.

    I guess what I'm getting at is, what exactly is the problem... specifically. The image doesn't show up? Is it in the wrong location/position? etc.

    Thanks,
    witty comment here...

  3. #3
    SitePoint Addict Poiesis01's Avatar
    Join Date
    Jun 2007
    Location
    Cape Town
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That looks fine to me. Maybe try background-position: top left; or background-position: top right; for horizontal and vertical positioning.

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just don't know - the code is a little messy to post, but I've run through it a hundred times. I chopped it down to its core, and it still didn't work. Argh!!!

    Is there any way to make rounded corners other than this method?

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I found a way around this... I was able to put one rounded corner (a 10x10 px image) in the top left of my TD. How do I also put it into the top right, bottom left, and bottom right in one statement?

  6. #6
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fromtherooftops View Post
    Ok, I found a way around this... I was able to put one rounded corner (a 10x10 px image) in the top left of my TD. How do I also put it into the top right, bottom left, and bottom right in one statement?
    I'm sorry, but this isn't doable with todays CSS. You can only apply one background to each tag...

    Here's a link that should help you out with that thou:

    http://tools.sitepoint.com/spanky/how.php

    - Icky


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
  •