Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

css question

Another question about css.

Can someone look at this page and tell me why the text and image is not centered?

http://www.idealelementary.com/pages/8_intelligences.html

Thanks,

John

John Cesta
Sunday, November 09, 2003

What does your stylesheet say about <td>?
You could also try this <td align=center"> first.

Jorgen Brenting
Sunday, November 09, 2003

you aren't using css to position your table.  In fact, you seem to being using lots of depricated attributes in your html code to position things.  If you want to try css you should first:

1. maker sure your page validates
2. strip all the attributes out of your html that you can do with css
3. build your css slowly to understand each step.

Lots of help at http://css-discuss.incutio.com/?page=CssDiscussList  (css discussion mailing list)

Joel Goldstick
Sunday, November 09, 2003

Good grief, "depricated attributes" is how I feel every morning, or is that a technical term?

tk
Sunday, November 09, 2003

depricated attributes... there are parts of html that work but that are not going to work in future versions.  XHTML in particular says "don't use this stuff".  But, the things they say not to use can be done with CSS.  If you clean out your presentation attributes from your html you get benefits:  First, your pages are usually a lot smaller.  Second, they are easier to edit -- you don't need to type in all that stuff.  Using CSS instead lets you set it once and forget.  And when you get bored with your color scheme, or your layout, you can just change the css file and ... voila, the whole site is new looking, and you didn't have to edit all of those articles you have created over time.

But maybe i was being kinda upity with the lingo.. sorry.. as you can tell I am a strong CSS advocate

Joel Goldstick
Sunday, November 09, 2003

I thought I should follow up with some references.  This link to the html spec talks about attributes used in formatting:

http://www.w3.org/TR/html401/present/graphics.html

This link defines "depricated"
http://www.w3.org/TR/html401/conform.html#deprecated

Joel Goldstick
Sunday, November 09, 2003

Change Line 19 to:

<table cellpadding="10" align="center"> <tr><td>

The paragraph was centered, the table it's in was not.

www.MarkTAW.com
Sunday, November 09, 2003

btw, this is a depricated answer.

www.MarkTAW.com
Sunday, November 09, 2003

depricated is apparently really spelled deprecated.

!!!

Joel Goldstick
Sunday, November 09, 2003

...and spelled is spelt! ;-)

John Topley (www.johntopley.com)
Monday, November 10, 2003

John,

not in the US it isn't

Joel Goldstick
Monday, November 10, 2003

I know that the word used for tags that will be removed is deprecated, but from looking in the dictionary a better choice may have been depreciated.

Ron Lane
Monday, November 10, 2003



Yea, Mark, that was it. The table wasn't centered. I thought it was a complex css problem. :)


Thanks,

John Cesta

John Cesta
Monday, November 10, 2003

Oh my God, TD BGCOLOR is already deprecated.  ALIGN is deprecated. It was hell enough learning tables in 1995. Now the nob-heads at W3C want me to learn HTML all over again? Ya, right. I'll replace HTML4 "deprecated" tags with CSS and follow the W3C's other marching orders when the Semantic Web takes off ( http://www.shirky.com/writings/semantic_syllogism.html ) or Netscape reduces Windows to a set of device drivers, whichever happens first.

Also, emacs is better than vi and Windows is better than Mac :--) 

Sigh. I'm just bitter, old, fat, bloated ... I feel like Netscape4.

Ryan Tate
Tuesday, November 11, 2003

I don't thing deprecated markeup will ever not display in browsers, because there is too much stuff written that way out there.  No company is going to want to say 'to heck with anything written before 200x".

I think the idea is that now that CSS is available and to a great extent supported by modern browsers, it is a better way to create new markup.  I know lots of people don't buy into that, but if you do buy into that, just go forward that way.  Don't worry about what is already out there.

Joel Goldstick
Tuesday, November 11, 2003

Speaking of widespread CSS adoption and depreceted (can we find more alternate spellings?), how many browsers currently support things that aren't in the latest W3C spec?

There's the theoretical what works because the W3C says so, and what works in reality. When the HTML5 spec comes out and says "HTML no longer exists, everything is CSS" IE will probably still do the stupid page wipe thing that nobody uses, and the blink tag will still work.

www.MarkTAW.com
Tuesday, November 11, 2003

*  Recent Topics

*  Fog Creek Home