Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    Hello,
    How do you specify all the links' colors only in a particular div or only in a particular table? (again, just the links, in just that particular div or table)

    Although I write as below, the links do not appear red:

    .bottombuttons
    {
    position:absolute;
    left:5px;
    top:2200px;
    font-family: arial; font-size:12px; font-color: red;
    }

    I can not adjust font size of the links either even if change the font size above to something other than 12px...

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    font-color? I may be out of the loop but thats a new property to me.

    I take it the div or table has a class of bottombuttons.

    If so, that style rule will affect all text in that element, not just the links.

    Try something like this

    Code:
    .bottombuttons
    {
        position: absolute;
        left: 5px;
        top: 2200px;
        font-family: arial, sans-serif;
    }
    
    .bottombuttons a:link,  .bottombuttons a:visited, .bottombuttons a:hover, .bottombuttons a:active
    {
        color: red;
    }
    The reason I defined 2 sttyle rules os because the first style rule looks like you want it applied to the actual element and the second style rule is just for the links.

    Also, just a side note you should not name your elements/ids like bottombuttons or anything that indicates where on the page that element goes.Why? If you later come to change its position then you will either need to update the class/element name and then update the HTML references or you will have an out of date class/element name.

    Instead you should use the class/id name to describe what the element is for.

  4. #3
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    thanks, this works....


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com