hello, i am making a website and i need some help. I am writing a table, here is the code:

<table style='float: left;'>
  <tr><td style='width: 200px; height: 500px; background-color: red; valign: top; align: top;'><a class='mainlink' href='about.html'>About Me (under construction)</a><br />
  </td></tr>
  </table>

now, i want the link to align to the top of the the table. here is the css for the link

<style type='text/css'>
 body{
 background-color: black;
 color: white;
 }
 .marquee{
 font-size: 20px;
 font-weight: bold;
 }
 .mainlink{
 color: black;
 text-decoration: none;
 vertical-align: top;
 }
 .mainlink:hover{
 color: white;
 text-decoration: underline;
 }
 </style>

if someone could help asap, i would be greatful

Well, i checked out your coding on Dreamweaver CS5, and your link is at the top of the table. it look like the way you want it. Can you elaborate on your issue a little more?

on my computer, the link isnt at the top

alright, i just previewed it on the browser. I see what you're talking about now, the link goes to the middle of the page, let me see what I can do. :)

here, i was able to make the words stay at the top of the page. But you will need to add more coding to suit you. Hope this helps :)

<table style='float: left;'>
<tr><td style='width: 200px; height: 10px; background-color: red; valign: top; align: top;'><a class='mainlink' href='about.html'>About Me (under construction)</a><br />
</td></tr>
</table>

<table style='float: left;'>
      <tr><td style='width: 200px; height: 10px; background-color: red; valign: top; align: top;'><a class='mainlink' href='about.html'>About Me (under construction)</a><br />
      </td></tr>
      </table>

srry about that, forgot to add the code, lol

I hope that untitledking's response helped, but for future reference, 'valign: top' only works on a <td>, not on anything else...

lol, I hope so too :D

It was working on my computer though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.