table alignment

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
php3ch0
Forum Contributor
Posts: 212
Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK

table alignment

Post by php3ch0 »

I have a problem (surprise surprise)

When I create a table all of the cells default align to the centre. They used to align to the left and I don't know what I have changed It means going through my whole project and making sure all alignment is aligned to the left.

Could it be something have done in css?

css code:

Code: Select all

.body,td,th {
	font-family: Comic Sans MS;
	font-size: 14px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	color: #000000;
}
Please can someone help!
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Can you post a link to the page(s)?
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

In IE, cells inherit the alignment from parents, so if your page has <div align="center"> on it anywhere the cells will align to the center.
FF and Opera don't do this. You'll have to stuff an align="left" into each one (or maybe you can put it in the <tr>, I don't know).
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

if, in your CSS, you define text-align:left !important, it *should* be given precedence over other text alignment declarations - that's what the !important is supposed to do.

Also, this sounds client-side, so I'm moving it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply