Sunday, February 15, 2009

I hate HTML


Especially the table layout. This thing was conceived by total morons. I would build a memorial to the authors of this abomination with inscription: "Spit here!"

Consider this:

table-layout: fixed;
width: 750px;
border: solid black 1 px;

width: 150px;
width: 600px;
<table class = "CssTable">
<tr><td class = "CssCell1">Cell 1</td>>td class="CssCell2">Cell 2</td></tr>

It does the right thing: the table is 750 pixels, the first column is 150 and the second one is 600. All is well. Now insert this line right after the table tag (as the first row):

<tr><td colspan=2>Long line</td></tr>

...and all the alignemnt just goes to hell. The columns become equally sized. Why?!

There is a solution - it is to create table header and set its sizes to what the desired sizes of columns are. Still, WTF?

No comments: