PDA

View Full Version : centering table centers text


ibClare
07-28-2011, 10:55 PM
I am rather a low tech user of Dreamweaver, having come over very, very recently from DW3 (css was just introduced and I ignored it till now). So I imported a page from DW3 and I can't figure what's up.

I have 3 small tables one on top of the other. All are centered on the page. The text should all be left. But in the first table only, the text is centered. The code seems to indicate center align for the table only, but I wonder if I'm missing anything. I would appreciate if someone would look at the code at point out my error or recommend another approach.

I have not tried closing DW and reopening it but . . .

Thank you, Clare

domedia
07-29-2011, 01:28 AM
Someone with 12 minutes available should rewrite that code for you so you can see the power of Web Standards :) Once you go that route you'll never go back.

ibClare
07-29-2011, 01:40 AM
Someone with 12 minutes available should rewrite that code for you so you can see the power of Web Standards :) Once you go that route you'll never go back.

Thanks Domedia. I have a lot to learn. I'm using lynda.com, but I'm still finding the css a bit confusing. Anyway, I'm sure I'll get there! Maybe someone will rewrite it for me. That would be very instructional, but I understand it takes time.

BTW, I did search the forum before I posted :twisted:

Tx, Clare

domedia
07-29-2011, 04:54 AM
It's something in your CSS. Can you put the page somewhere temporarily on the web, and give a link in here?

ibClare
07-29-2011, 06:51 AM
It's up already: clarehart.com/reunion

Tables should be centered; all text left aligned. It's slightly different on IE than Chrome btw; more centered text on IE (or it's my eyes :roll: ).

[this is kind of embarrassing as my site is so basic... but I still want it to work right!]

Corrosive
07-29-2011, 06:57 AM
OK, I think it is this;

body {
background-color: #033;
margin-left: 40px;
margin-top: 40px;
text-align: center;
}

That is causing it. Try taking that rule out and see what happens.

By the way you have a rule called .Paragraph! Why not just us a paragraph <p></p> tag and style that?

ibClare
07-29-2011, 04:44 PM
OK, I think it is this;

body {
background-color: #033;
margin-left: 40px;
margin-top: 40px;
text-align: center;
}

That is causing it. Try taking that rule out and see what happens.

By the way you have a rule called .Paragraph! Why not just us a paragraph <p></p> tag and style that?

Thank you Corrosive (and Domedia) - tried to reply last night; guess the server was dn. Yes,, duh, never even saw that. I looked in the code of the body where my html mind takes me and just stopped there. Hopefully, I'll have a bit more knowledge next time I post. TYVM for taking the time to help me. :mrgreen:

It'll be fun to expand the capabilities of that site as I get more familiar with DW CS5.

Cheers, Clare