How can I change the <a> tags in this element all at the same time

Discussion in 'CSS' started by thechasboi, Oct 25, 2006.

  1. #1
    I have this application that allows the members to change certain aspects of their site and then saves the info for the users to see as they visit. But the bummer thing are the links in this div. I am not sure how to change them globally with out making major trouble for my self. If there is a way to change the color of the links globally i would appreciate the thoughts and or help. Thanks in advance.
    
    <div id="ContactTitle" style="margin-top:3;margin-left:3;width:100%;font-weight:bold;">Contact Information:</div>
    	<div style="float:left;width:100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;" class="tableBox">
    		<div id="ContactBody">
    			<div style="border-left:none;float:left;width:100%;clear:both;display:table;border-bottom: 1px solid gray;border-top: 1px solid gray;" class="tableBox"><div id="ContactBody0" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Address:</div><span id="ContactInfo0" style="padding-left:3;float: left; border-left: 1px solid gray;">test<br>test, test tse<br>tset&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody1" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Phone:</div><span id="ContactInfo1" style="padding-left:3;float: left; border-left: 1px solid gray;">test&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody2" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Mobile:</div><span id="ContactInfo2" style="padding-left:3;float: left; border-left: 1px solid gray;">test&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody3" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Fax:</div><span id="ContactInfo3" style="padding-left:3;float: left; border-left: 1px solid gray;">test&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody4" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Email:</div><span id="ContactInfo4" style="padding-left:3;float: left; border-left: 1px solid gray;"><a href="mailto:?to=test@test.com">test@test.com</a>&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody5" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Web:</div><span id="ContactInfo5" style="padding-left:3;float: left; border-left: 1px solid gray;"><a href="redirect.asp?ID=1025&amp;Link=2&amp;address=http://www.cnn.com">http://www.cnn.com</a>&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody6" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Web2:</div><span id="ContactInfo6" style="padding-left:3;float: left; border-left: 1px solid gray;"><a href="redirect.asp?ID=1025&amp;Link=2&amp;address=http://www.msn.com">http://www.msn.com</a>&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody7" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Web3:</div><span id="ContactInfo7" style="padding-left:3;float: left; border-left: 1px solid gray;"><a href="redirect.asp?ID=1025&amp;Link=2&amp;address=http://www.google.com">http://www.google.com</a>&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody8" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Web4:</div><span id="ContactInfo8" style="padding-left:3;float: left; border-left: 1px solid gray;"><a href="redirect.asp?ID=1025&amp;Link=2&amp;address=http://www.indexedvisuals.com">http://www.indexedvisuals.com</a>&nbsp;</span></div>
    			<div style="float:left; width: 100%; clear: both;border-bottom: 1px solid gray;border-top: 1px solid gray;border-right: none;" class="tableBox"><div id="ContactBody9" style="margin-left:3;border-left:none;float: left; width: 5em;" class="contactText">Web5:</div><span id="ContactInfo9" style="padding-left:3;float: left; border-left: 1px solid gray;"><a href="redirect.asp?ID=1025&amp;Link=2&amp;address=http://www.ivart.com">http://www.ivart.com</a>&nbsp;</span></div>
    		</div>
    	</div>
    </div>
    [\code]
    Code (markup):

     
    thechasboi, Oct 25, 2006 IP
  2. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #2
    
    #ContactBody a {
    color: red;
    }
    
    Code (markup):
     
    SoKickIt, Oct 25, 2006 IP
  3. thechasboi

    thechasboi Guest

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    SoKickIt

    Thanks for the reply. Simple as that cool.. Will this cover the visited link color as well? If so then great and awsome.
     
    thechasboi, Oct 25, 2006 IP
  4. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #4
    Yeah, and you can make them look different if you want to:

    
    #ContactBody a:link {
    color: ...
    }
    
    #ContactBody a:visited {
    color: ...
    }
    
    #ContactBody a:active {
    color: ...
    }
    
    #ContactBody a:hover {
    color: ...
    }
    
    Code (markup):
     
    SoKickIt, Oct 25, 2006 IP
  5. thechasboi

    thechasboi Guest

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    SoKickIt

    Thanks for the help. It did the trick. Most appreciated.
     
    thechasboi, Oct 25, 2006 IP