SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    line background?

    Is there anything for line background colour, or with a font background setting the background width?
    I want to simulate having text in a cell with a background, using CSS
    Andy: Always Morphin Dwarfs

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
    .backgroundText {
    background:url('image.jpg');
    font-family:verdana,arial,helvetica,sans-serif;
    font-size:1em;
    color: #000;
    }
    
    ...further down the page
    
    <span class="backgroundText">My text here</span>
    This will give you a span of text with a background image behind it. I'm not sure if that's what you want but that's what it seems like from your question.

    --Vinnie

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I actually wanted a colour behind the text, so would this work?
    Code:
    .backgroundText {
    background:color('#0000CC');
    font-family:verdana,arial,helvetica,sans-serif;
    font-size:1em;
    color: #000;
    }
    
    ...further down the page
    
    <span class="backgroundText">My text here</span>
    Thanks
    Andy: Always Morphin Dwarfs


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
  •