Link to home
Start Free TrialLog in
Avatar of eladr
eladr

asked on

about css syntax

this is my very simple html document
<html>
<head>
<title>Untitled</title>
</head>
<body bgcolor="white">
<table width=500 bgcolor="black">
<tr><td>
<a href="fff.htm">hellow</a><br>
<a href="fff.htm">goodbye</a>
</tr></td>
</table>
<a href="elad.htm">elad</a>
</body>
</html>
i want that the 2 ancors inside the
table will be yellow and the ancor
that is out of table will be ordinary
blue.
notice that i dont want to do this:
<a class="rule" href="fff.htm"> hellow</a><br>
<a class="rule" href="fff.htm">goodbye</a>

because let's assume i have 50 links
and i dont want to type class="rule"
each time...
notice also that the <a href...
is inside the table.

elad

Avatar of ruperts
ruperts

You could create a class, and then ether surround the table in <DIV class="myclass">table goes here</DIV>

Or <table class="myclass">
</table>!
Avatar of eladr

ASKER

is so...what should be my style tag?
please please give me complete answer.

elad

you could do like this:
<style>
#yellow{color:yellow;}
</style>
then just put id="yellow" in the a hrefe ex <a href="page.html" id="yellow">Yellow</a>
This should work and won't effect your other links.

//jce
ASKER CERTIFIED SOLUTION
Avatar of nettrom
nettrom

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial