SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2002
    Location
    UK
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing font background colour..?

    Hi
    I've got a small prob (again) which I can't suss.
    What I want to do is change the colour to the background to some text.
    What I mean is, you know when you left click with the mouse and drag over text, the background for that text changes, well I would like this effect for some of my text i.e. different colour to white.
    I'm using some CSS to define size of text to all text but is there away to define the background colour for text, but not all the text.
    Hope someone has a solution CSS or other means.
    Thanks again sanc

  2. #2
    The Legend Indian's Avatar
    Join Date
    Nov 2001
    Location
    Gods' Own Country
    Posts
    890
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    background-color:#505050;
    Death --the last sleep? No, it is the final awakening.

    TinyPlanet.org
    Discuss and Debate World Events, Politics and Religion

  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean that the background color changes on a mouseover

    This can be done like this:

    Code:
    <a href="">text</a>
    And then your css:

    Code:
    a:link
    {
      background-color: transparent;
    }
    
    a:hover
    {
      background-color: white;
    }


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
  •