Jump to content

Table Cell Width in Javascript


Recommended Posts

I need to get the width of a particular cell of a table in Javascript. The problem is, the cell doesn't have a width specified; I just set the table to 90% of the page's width. Is there a way to do this? (Don't care if it doesn't work in IE...)

Link to comment
Share on other sites


Basically just this:

HTML:

<table class="navbar" width=90%><tr>
<td><a href="main.php">Home</a></td>

CSS:

table.navbar {
text-align: center;
border-collapse: collapse;
}

.navbar td {
border: 4px #204080 ridge;
}

.navbar a {
display: block;
text-decoration: none;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...