/    Sign up×
Community /Pin to ProfileBookmark

Whats wrong with my table??

I’m kind of new to CSS, but I’m comfortable with it and haven’t had any trouble until just now. I have one page that contains a lot of tables with a number of them formated the same way. So I set up the css file with the following:

[CODE]table.internal
{
border-style: none;
border-spacing: 0px 0px;
text-indent: 8px;
}

th,tr.visible
{
background-color: #FFFFFF;
color: #000000;
font-weight: bold;
text-align: center;
}

tr.odd {background-color: #FF0000;}

tr.even {background-color: #000000;}[/CODE]

The tables have the following structure:

[code=html]<table class=”internal”><tr class=”visible”><th>Level</th><th>Base Attack Bonus</th><th>Fort Save</th><th>Reflex Save</th><th>Will Save</th><th>Special</th></tr>

<tr class=”odd”></tr><td>1st</td><td class=”center”>+0</td><td class=”center”>+2</td><td class=”center”>+2</td><td class=”center”>+2</td><td>–</td></tr>

<tr class=”even”></tr><td>2nd</td><td class=”center”>+0</td><td class=”center”>+2</td><td class=”center”>+2</td><td class=”center”>+2</td><td>–</td></tr>

<tr class=”odd”></tr><td>3rd</td><td class=”center”>+0</td><td class=”center”>+2</td><td class=”center”>+2</td><td class=”center”>+2</td><td>–</td></tr>

<tr class=”even”></tr><td>4th</td><td class=”center”>+0</td><td class=”center”>+2</td><td class=”center”>+2</td><td class=”center”>+2</td><td>–</td></tr>

<tr class=”odd”></tr><td>5th</td><td class=”center”>+0</td><td class=”center”>+2</td><td class=”center”>+2</td><td class=”center”>+2</td><td>–</td></tr>

<tr class=”even”></tr><td>6th</td><td class=”center”>+0</td><td class=”center”>+2</td><td class=”center”>+2</td><td class=”center”>+2</td><td>–</td></tr>
</table>[/code]

While my first table looks correct, all of the others are messed up. The “visible” row works correctly, but everything after that is formated only as “internal”. What’s going on? I thought maybe it was something with dreamweaver, but when I opened it in my browser it was the same thing. With right-clicking in the design view of dreamweaver you can see what css style is affecting that element and only “internal” was affecting the rows.

Please help, thanks!
LT

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@dwschultzFeb 08.2008 — The table row end tag , </tr> after the class = odd or even should be eliminated.
Copy linkTweet thisAlerts:
@Lord_TatarausauthorFeb 08.2008 — :o Oops, thanks for catching that. I'm glad it was just a simple typo.
×

Success!

Help @Lord_Tataraus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...