www.webdeveloper.com
Results 1 to 4 of 4

Thread: CSS background (image) no-repeat

  1. #1
    Join Date
    Mar 2006
    Posts
    172

    CSS background (image) no-repeat

    Hi all...first post,

    I've got a header .jpg that contains text. Most of the text is alright, but as is frequently the case, the smaller text is not very sharp=looks bad.

    So I sliced up my header image so I could delete that small text from it's cell in the table and replace it with just regular text (styled with css, if that matters). Obviously, that can create some problems if people use their browsers to resize the text (the cell is in the middle row of my sliced image). In my case, my image is cut such that there are two cells that are effected, and here's what I wanted to do with those two cells (1 example):

    <td width="231" height="57" background="images/slice/TopGraphic2Black_2x2.jpg" background-position="bottom" background-repeat="no-repeat">

    That's not preventing the repeat of the background image, though it looks like it is positioning it correctly (I'm not positive about that). Is my syntax just messed up or can't this be accomplished? I don't have this site posted, so I'm hoping someone can just tell me what's wrong with the execution.

    Thanks,
    CFH

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Why do you think those are attributes of the td element?
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  3. #3
    Join Date
    Nov 2005
    Location
    127.0.0.1
    Posts
    329
    try this: <td style="background: url(image.jpg) bottom no-repeat;">
    my computer suffers from short-term memory loss.

  4. #4
    Join Date
    Mar 2006
    Posts
    172
    Quote Originally Posted by thewebman
    try this: <td style="background: url(image.jpg) bottom no-repeat;">
    Awesome! Thank you very much.

    CFH

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles