div align=center
What is the difference between and aside from the obvious difference that the latter is CSS?
cscgal
The Queen of DaniWeb
19,436 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 230
well, I've experimented with it a little before and validated it, aligning a div is not valid strict xhtml 1.0 anyways heh :). Other than that I don't know, I know I had different results when I used the div align but none that would make sense. E.g. I set the text-align in my stylesheet to right, this worked but I set the div align to bottom, nothing happened with the text but an image I had in the same div was aligned to the top :). Other than that I'm not sure, I think that text-align only applies to text.
once again, my opinion is much ado about nothing.
Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
align= is deprecated.
And the W3C clowns gave us no good way to center images in nondeprecated ways. They are thinking book and newspaper layout, where images are never centered.
So I do this:
<style type="text/css">
.cenx {text-align: center;}
.ceni {clear: both;}
.bxfix {margin: none; border: none; padding: none;}
img {padding: 12px;}
body {padding: 5%;}
</style>
Then for the image itself:
<div class="bxfix cenx">
<img src="mine.jpg" alt="my mine" class="ceni" />
</div>
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182