Re: HTML Formatting in .NET 2.0



Okay, i understand all that, and it makes sense. And given that i would
agree it would be
better to find the "new & improved" way of styling my tags as opposed to
turning off the
validation tag.
I still have some questions then though about the specific styles of HEIGHT
and ALIGN.

HEIGHT does not seem to do anything even when i put it in the style of the
object instead
of as its own attribute. My footer (which i want to always be at the bottom
of the page)
winds up scrunched as close to the top of the page as possible (base on
current cotent of
the table). So how do i tell the new XHTML that i want my table to stretch
itself to the full
height of the document?

Also, what is the proper way to align the table in the center of the page. I
personally cannot
stand when a web page hangs off to the left side of the screen, so i would
always put on my
main table an ALIGN=CENTER, so that it would be in the middle of the page.
But this is
gawked at by the IDE, and i tried doing an ALIGN: CENTER in the style
instead but it had
no effect.

Also, does it _functionaly_ make a difference whether the style definition
is in a CSS vs.
a STYLE tag in the document vs. a STYLE attribute on the element?

Thanks in advance,
- Arthur Dent.


"Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:eTg$VWlBGHA.1312@xxxxxxxxxxxxxxxxxxxxxxx
> Tools|Options|TextEditor|HTML|Validation is where you can turn this off.
>
> You should be aware, though, that the reason this is used is because XHTML
> will eventually supercede HTML on the WWW. This is a good thing. HTML has
> become increasingly complex and unpredictable across many browsers. The
> formatting rules for it are not strict enough, and it is not easily
> extensible. XML in general, and XHTML specifically, are much more
> extensible than HTML. XML follows some very strict but simple formatting
> rules. For example, elements can not overlap. Opening tags must always be
> followed by closing tags. Attributes must always be quoted. These things
> will eventually cause all browsers to render content in the same way. But
> some things you are now doing may not work correctly in browsers in the
> future. Learning the XHTML standard, or at least the transitional
> standard, will prevent a lot of future headaches for you, though they may
> cause you a few in the short run (learning them, that is).
>
> XHTML relies on styles almost exclusively, rather than attributes. This is
> also a good thing. Putting CSS styles into an external style ***, or at
> least in a style *** in the <head> of the document separates the layout
> presentation rules from the HTML objects themselves, which makes it much
> easier to change the way your documents look. Inline attributes (and
> inline CSS styles) "lock" the appearance into the structure of the object,
> making it difficult to find, identify, and change the way the elements
> look and behave. The use of external CSS style sheets also allows you to
> use the same style *** for many documents, which is also a very good
> thing.
>
> Many attributes are already deprecated. The "height" attribute has not
> been a part of the standard since at least HTML 3.2, and I'm not sure if
> it ever was. The "width" attribute of a table has been recently
> deprecated. All of this is heading towards the use of CSS for this type of
> thing.
>
> So, I gave you the means to turn it off, and a few reasons not to. Now the
> ball is in your court!
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> You can lead a fish to a bicycle,
> but it takes a very long time,
> and the bicycle has to *want* to change.
>
> "Arthur Dent" <hitchhikersguideto-news@xxxxxxxxx> wrote in message
> news:eL$qYYkBGHA.3984@xxxxxxxxxxxxxxxxxxxxxxx
>> Hello all, ive been programming with ASP.NET since it came out, but am
>> just getting my feet with now with v.2.
>> Ive noticed something strange in the way my HTML tables get rendered with
>> 2.
>>
>> I use tables to layout my pages, doing three rows, a header, content and
>> footer. When i do this, i make the tables height=100%,
>> so the footer always shows up at the very bottom of the page.
>>
>> With 2.0/2005 though, when it renders the pages, it doesnt actually
>> render at 100% height (even though the code is in the ViewSource of the
>> page).
>> the table only goes as high as the content forces it, as if the height
>> were not set at all.
>>
>> Ive traced it to this line put in by the designer:
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>>
>> Is there a way to turn this off, so the designer doesnt put this line
>> out, so that my tables will render properly? I tried using the Insert
>> Table wizard, and specifying the height of 100% but it the same problem
>> as manually coding it.
>>
>> Oh, also, it tells me the "align" attribute is obsolete on the table tag,
>> and i should use the newer construct, but it doesnt tell me what that
>> is... what is considered the "right" way to align a table in the center
>> of the page now?
>>
>> Thanks in advance,
>> Arthur Dent
>>
>
>


.