two tables with same id

G

Guest

I have a little one cell table that acts like a "Go to Top" button in my
Frequently Asked Questions page.
<table border="2" width="70" bgcolor="#B7A5C1" id="mytop"
style="border-color: #000000">
<tr>
<td>
<a href="#begin" style="text-decoration: none">
<font color="#000000" size="1">Go to Top</a></td>
</tr>
</table>


I want to have the user click anywhere in the cell (not just on the words
"Go to Top", so I put this style in:
<style type="text/css">
#mytop td a{
position:relative;
display:block;
}
</style>

Can I give all these mini-tables the ID "mytop" or does every table need a
unique ID?
 
K

Kevin Spencer

The id must be unique, but you can assign the same CSS *class* to every
table:

<style type="text/css">
..mytop td a{
position:relative;
display:block;
}
</style>

<table border="2" width="70" bgcolor="#B7A5C1" class="mytop"
style="border-color: #000000">

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top