1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

css hyperlink help

Discussion in 'CSS' started by Solicitors Mortgages, Jan 13, 2005.

  1. #1
    i have a table that has 96 hyperlinks in it, how can i set the hyperlink properties of the whole table so that i dont need to write
    <a class="mystyle" in front of all 96 hyperlinks? :confused:
     
    Solicitors Mortgages, Jan 13, 2005 IP
  2. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #2
    table a:link {
    style info here: like this;
    }
     
    SEbasic, Jan 13, 2005 IP
  3. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #3
    thanks mate, it must be early as that went right over me.
    so i have to write all of this in there? on the page?

    table a:link {color: #000080}
    a:visited {color: #000080}
    a:hover {color: #C0C0C0}
    a:active {color: #000080
    }
     
    Solicitors Mortgages, Jan 13, 2005 IP
  4. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #4
    here's an example...i just cant figure where to insert the code you said :mad:

    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 3px solid #000080;" width="750" id="tablez5">
    <tr>
    <td class="tablez5" width="250">
    <a class="aa" href="PLACE-Car-Sales-cars-sale-dealers.htm">Car Sales</a><br>
    <a class="aa" href="PLACE-Car-Repair-MOT-mechanics.htm">Car Repair &amp; MOT</a><br>
    <a class="aa" href="PLACE-articles-for-sale-classifieds.htm">Articles for Sale</a><br>
    <a class="aa" href="PLACE-Rent-Rooms-to-Let-accommodation.htm">Rented Accommodation</a><br>
    <a class="aa" href="PLACE-Property-for-Sale-houses-estate-agents.htm">Property for Sale</a><br>
    <a class="aa" href="PLACE-Job-Vacancies-Full-time-jobs.htm">Job Vacancies Full time</a><br>
    <a class="aa" href="PLACE-Job-Vacancies-Part-time-jobs.htm">Job Vacancies Part time</a><br>
    <a class="aa" href="PLACE-Job-Vacancies-60+-jobs.htm">Jobs for Age 60+</a><br>
    <a class="aa" href="PLACE-Motorbikes-mopeds-scooters-accessories.htm">Motorbikes Sale/Repair</a><br>
    <a class="aa" href="PLACE-Computer-Services-Upgrades-repairs.htm">Computer Services</a><br>
    <a class="aa" href="PLACE-Travel-Agents-Holidays-holiday.htm">Holidays</a><br>
    <a class="aa" href="PLACE-Weddings-wedding-arrangements-dresses.htm">Weddings</a><br>
    <a class="aa" href="PLACE-Funerals-Funeral-Directors-Services.htm">Funerals</a><br>
    <a class="aa" href="PLACE-Cleaners-office-domestic-cleaning.htm">Cleaners</a><br>
    <a class="aa" href="PLACE-Garden-Gardening-gardeners.htm">Garden Services</a><br>
    <a class="aa" href="PLACE-Domestic-Kitchen-Appliance-Service.htm">Domestic Appliances &amp; Repair</a><br>
    <a class="aa" href="PLACE-business-Classifieds-listings-businesses.htm">Assorted Businesses</font></a><br>
    <a class="aa" href="PLACE-repairs-TV-hi-fi-Video-Repair.htm">TV Hi-fi Video</a><br>
    &nbsp;</td>
    <td class="tablez5" width="250">
    <a class="aa" href="PLACE-Decorators-painters.htm">Decorators</a><br>
    <a class="aa" href="PLACE-Plumbers-plumbing-Gas-fitters.htm">Plumbers &amp; Gas</a><br>
    <a class="aa" href="PLACE-Electricians-electrician.htm">Electricians</a><br>
    <a class="aa" href="PLACE-Tradesmen-interior.htm">Tradesmen-interior</a><br>
    <a class="aa" href="PLACE-Tradesmen-exterior.htm">Tradesmen-exterior</a><br>
    <a class="aa" href="PLACE-Block-Paving-Driveways-skips-skip-hire.htm">Driveways &amp; Skip Hire</a><br>
    <a class="aa" href="PLACE-builders-tool-hire.htm">Builders</a><br>
    <a class="aa" href="PLACE-UPVC-Windows-Conservatories.htm">Windows &amp; Conservatories</a><br>
    <a class="aa" href="PLACE-Carpet-Flooring-fitters-carpets.htm">Carpet &amp; Flooring</a><br>
    <a class="aa" href="PLACE-Taxi-Car-Rental-hire-taxis.htm">Taxi &amp; Car Rental</a><br>
    <a class="aa" href="PLACE-Sports-Leisure-football-club.htm">Sports &amp; Leisure</a><br>
    <a class="aa" href="PLACE-Health-Fitness-clubs-doctors.htm">Health &amp; Fitness</a><br>
    <a class="aa" href="PLACE-Hair-Beauty-salons.htm">Hair &amp; Beauty</a><br>
    <a class="aa" href="PLACE-Child-Nursery-Equipment.htm">Child &amp; Nursery</a><br>
    <a class="aa" href="PLACE-baby-babies-childcare.htm">Baby Stuff</a><br>
    <a class="aa" href="PLACE-Kids-Parties-Activities.htm">Kids Parties &amp; Activities</a><br>
    <a class="aa" href="PLACE-Pets-Pet-Shops-vets.htm">Pets &amp; Animals</a><br>
    <a class="aa" href="PLACE-Local-Hotels-bed-breakfast.htm">Local Hotels</a></td>
    <td class="tablez5" width="250">
    <a class="aa" href="PLACE-Entertainment-days-out-night-clubs.htm">Entertainment</a><br>
    <a class="aa" href="PLACE-Theatre-Cinema-listings.htm">Theatre &amp; Cinema</a><br>
    <a class="aa" href="PLACE-Restaurants-Take-away-takeaway.htm">Restaurant &amp;Takeaway</a><br>
    <a class="aa" href="PLACE-Hobbies-Clubs-Societies.htm">Hobbies Clubs &amp; Societies</a><br>
    <a class="aa" href="PLACE-Local-Events.htm">Local Events</a><br>
    <a class="aa" href="PLACE-adult-education-schools.htm">Education</a><br>
    <a class="aa" href="PLACE-arts-crafts.htm">Arts &amp; Crafts</a><br>
    <a class="aa" href="PLACE-Music-Shops-lessons.htm">Music &amp; Lessons</a><br>
    <a class="aa" href="PLACE-Financial-Advice-advisors-mortgage.htm">Financial Services</a><br>
    <a class="aa" href="PLACE-Solicitors-Advice-legal.htm">Solicitors &amp; Advice</a><br>
    *<a class="aa" target="_blank" href="../../internet-shops.htm">Internet shopping</a>*<br>
    <a class="aa" href="PLACE-Fashion-Clothing.htm">Fashion &amp; Clothing</a><br>
    <a class="aa" href="PLACE-books-book-sellers-shops.htm">Books &amp; Literature</a><br>
    <a class="aa" href="PLACE-Mobile-Phones.htm">Mobile Phones</a><br>
    <a class="aa" href="PLACE-Business-Opportunities-businesses-for-sale.htm">Business Opportunities</a><br>
    <a class="aa" href="PLACE-Business-Office-Supplies.htm">Office Supplies</a><br
    >*<a class="aa" href="PLACE-Links-Numbers.htm">Useful Numbers &amp; Links</a>*<br>
    </td>
    </tr>
    </table>
     
    Solicitors Mortgages, Jan 13, 2005 IP
  5. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You could remove the class="aa" for the links saving bandwidth and loading times.

    Instead u could use:

    #tablez5 a:link, #tablez5 a:visited, #tablez5 a:active {
    color: #000080
    }

    #tablez5 a:hover {
    color: #C0C0C0
    }
     
    xml, Jan 13, 2005 IP
  6. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Put this in the head of the page,

    <link rel="stylesheet" href="Location of style sheet" type="text/css" title="default" />

    In the .css file, place this

    table a:link {color: #000080}
    table a:visited {color: #000080}
    table a:hover {color: #C0C0C0}
    table a:active {color: #000080}

    That should do it...

    If not, try this
    td a:link {color: #000080}
    td a:visited {color: #000080}
    td a:hover {color: #C0C0C0}
    td a:active {color: #000080}

    or this
    tr a:link {color: #000080}
    tr a:visited {color: #000080}
    tr a:hover {color: #C0C0C0}
    tr a:active {color: #000080}

    I think one of them should work ;)
     
    SEbasic, Jan 13, 2005 IP
  7. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #7
    ok...i will have a play..thanks Guys...its just that in 2 hours cant find any examples on the web :(
    i even went to this w3 tutorial page......http://www.w3schools.com/css/default.asp
    and viewed the source to see how they set the properties on their hyperlinks...

    and they have <a class="left" EVERYWHERE...
    huh...some tutorial that is...even w3 waste bandwidth.!!
     
    Solicitors Mortgages, Jan 13, 2005 IP
  8. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #8
    all done, thanx guys,

    used XML's, worked fine :)

    i have quite a lot of stuff on my CSS as there are a lot of styles on my pages,
    it is now 4.7Kb

    do i assume that i shouldn't go any more?
    whats defined as a 'big Kb' stylesheet?
     
    Solicitors Mortgages, Jan 13, 2005 IP
  9. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    4.7Kb isn't that bad really.

    I pass my CSS files thru the PHP interpreter to compress by putting:

    AddHandler application/x-httpd-php .css
    Code (markup):
    In my .htaccess file, then in my CSS file I put:

    <?php
    ob_start('ob_gzhandler');
    header('Content-Type: text/css');
    ?>body {
    	margin: 0 0 15px 0;
    	padding: 0;
    	background-color: white;
    	font-family: Arial, Helvetica, Sans-Serif;
    	cursor: default;
    	font-size: 13px
    }
    PHP:
    This gzips the CSS file contents.

    Check http://www.feedsfarm.com/s.css

    Comes up as 1.27 KB for me, in reality the file is 5.35 KB.
     
    xml, Jan 13, 2005 IP
  10. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #10
    <<I pass my CSS files thru the PHP interpreter>>
    ROTFLMAO !!..yeh.. and in my wildest dreams,
    i have trouble doing hyperlinks in a table!

    Well when i need it rebuilt again, you can give me a quote...
    Manchester's not so far, so expect a knock!

    nice one xml :)

    GEM
     
    Solicitors Mortgages, Jan 13, 2005 IP
  11. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #11
    In CSS # denotes an ID, not a class. Since the original source uses classes, not IDs:

    <td class="tablez5" width="250">
    Code (markup):
    the style should be written like this:

    .tablez5 a:link, .tablez5 a:visited, .tablez5 a:active {color: #000080}
    Code (markup):
    J.D.
     
    J.D., Jan 13, 2005 IP
  12. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 3px solid #000080;" width="750" [b]id="tablez5"[/b]>
    Code (markup):
    tablez5 is the item ID ;)
     
    xml, Jan 13, 2005 IP
  13. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #13
    You are right. My bad. What threw me off is that the same name is used for the class name :)

    J.D.
     
    J.D., Jan 13, 2005 IP