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?
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 }
here's an example...i just cant figure where to insert the code you said <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 & 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 & 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> </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 & 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 & 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 & Conservatories</a><br> <a class="aa" href="PLACE-Carpet-Flooring-fitters-carpets.htm">Carpet & Flooring</a><br> <a class="aa" href="PLACE-Taxi-Car-Rental-hire-taxis.htm">Taxi & Car Rental</a><br> <a class="aa" href="PLACE-Sports-Leisure-football-club.htm">Sports & Leisure</a><br> <a class="aa" href="PLACE-Health-Fitness-clubs-doctors.htm">Health & Fitness</a><br> <a class="aa" href="PLACE-Hair-Beauty-salons.htm">Hair & Beauty</a><br> <a class="aa" href="PLACE-Child-Nursery-Equipment.htm">Child & 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 & Activities</a><br> <a class="aa" href="PLACE-Pets-Pet-Shops-vets.htm">Pets & 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 & Cinema</a><br> <a class="aa" href="PLACE-Restaurants-Take-away-takeaway.htm">Restaurant &Takeaway</a><br> <a class="aa" href="PLACE-Hobbies-Clubs-Societies.htm">Hobbies Clubs & 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 & Crafts</a><br> <a class="aa" href="PLACE-Music-Shops-lessons.htm">Music & 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 & 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 & Clothing</a><br> <a class="aa" href="PLACE-books-book-sellers-shops.htm">Books & 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 & Links</a>*<br> </td> </tr> </table>
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 }
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
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.!!
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?
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.
<<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
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.
<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