SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use CSS to get text to display differently on different parts of a page??

    Hello,

    How would I have to alter the following script inside of a style sheet to get text in different locations on a page to display differently.

    I have a handle on links using CSS. They are displaying the way I want them to. Below is an example of the CSS script I placed for the links in a left navigational column.
    Code:
    /* left nav links (over gold) main links */ 
    a.lnavml:link {color: #FFFFFF; } 
    a.lnavml:visited {color: #000000; } 
    a.lnavml:hover {color: #CCCCCC;  text-decoration: underline; }
    Would appreciate any help with this.

    WP
    Webbing Along!!!

  2. #2
    1-800-JMULDER JMulder's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,745
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only solution that comes in mind is using more different classes with exactly the same code except the color ofcourse. Unless you want it to happend randomly a JAVAscript would come in handy? But that isn't my area
    Jeroen Mulder

    w: www.jeroenmulder.com

  3. #3
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jmulder is right about using more different classes. Here is a tutorial I found helpful (especially if you are using DW): http://www.thepattysite.com/dreamwea...nkstyles3.html

  4. #4
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    Thanks for the link Marina it cleared up some things for me.

    I have included the <td> into the style code as you can see below

    Code:
    /* left nav links (over gold) main links */ 
    
    td.lnavml {color: #FFFFFF;}
    a.lnavml:link {color: #FFFFFF; } 
    a.lnavml:visited {color: #000000; } 
    a.lnavml:hover {color: #CCCCCC;  text-decoration: underline; }
    I have also included the <td> into the body as
    <td class="lnavml">

    The problem is I am not seeing any results. I do not know if my Web Host is having a refresh/cache problem today. I will wait awhile and see if any changes occur.

    Will post findings here.

    WP
    Webbing Along!!!

  5. #5
    Victory shall be mine tubedogg's Avatar
    Join Date
    Mar 2001
    Location
    Medina, OH
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm pretty sure what you posted won't work. Try this on for size:
    Code:
    /* left nav links (over gold) main links */ 
    
    td.lnavml {color: #FFFFFF;}
    td.lnavml A:link {color: #FFFFFF; } 
    td.lnavml A:visited {color: #000000; } 
    td.lnavml A:hover {color: #CCCCCC;  text-decoration: underline; }
    Kevin


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
  •